Average based on 1 criteria
I'm sure this is user error but I'm trying to average out compensation based on the job code then I'd like to create either a data mesh or vlookup to fill in the blank compensation with these averages. I've tried having a seperate sheet that has the job codes and then I'm trying to use the averageif formula. However I keep getting Incorrect Argument set when i type in =AVERAGEIF({Comp}, {Job Code2}, [Job Code]@row)
Thoughts from anyone on how to do this?
Best Answer
-
I think you are usigne the wrong order of argument:
Try this. =AVERAGEIF({Job Code2}, [Job Code]@row,{Comp})
Answers
-
I think you are usigne the wrong order of argument:
Try this. =AVERAGEIF({Job Code2}, [Job Code]@row,{Comp})
-
@Christian G. that didn't work....all $ are zero
-
Let's try another approch;
Collect all the Compasation for the jobcode at row
collect({comp},{job code 2},=[job code]@row)
Then Average it
=AVG(collect({comp},{job code 2},=[job code]@row))
-
@Christian G. This doesn't work, I'm getting an error of #INVALID COLUMN VALUE. I even tried something simple like countif to count how many times the job code is showing up and nothing is returning. The job code is in a format of '000682 to keep all the zeros at the front. Do you think that is making the difference?
-
Can you post screenshots of the sheets where the compensation and job code are, and where you try to get the formula?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!