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
-
Christian G. ✭✭✭✭✭
I think you are usigne the wrong order of argument:
Try this. =AVERAGEIF({Job Code2}, [Job Code]@row,{Comp})
Answers
-
Christian G. ✭✭✭✭✭
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
-
Christian G. ✭✭✭✭✭
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?
-
Christian G. ✭✭✭✭✭
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
I guess you forget to use AND( ).<\/p>
For example, <\/p>
- IF([Total Value to User Score]@row = <3.8, >4.7, \"Mild,<\/li><\/ul>
should be<\/p>
- IF(AND(<\/strong>[Total Value to User Score]@row < 3.8, [Total Value to User Score]@row > 4.7)<\/strong>, \"Mild\",<\/li><\/ul>
However, the following would be more straightforward.<\/p>
- =IF([Total Value to User Score]@row >= 4.8, \"No Pain\", <\/li>
- IF([Total Value to User Score]@row >= 3.8, \"Mild\", <\/li>
- IF([Total Value to User Score]@row >= 2.8, \"Moderate\", <\/li>
- IF([Total Value to User Score]@row >= 1.8, \"Very Severe\", <\/li>
- IF([Total Value to User Score]@row < 1.8, \"Extreme\", \"//www.santa-greenland.com/community/discussion/97363/\")))))<\/li><\/ul>
- IF(AND(<\/strong>[Total Value to User Score]@row < 3.8, [Total Value to User Score]@row > 4.7)<\/strong>, \"Mild\",<\/li><\/ul>