Note: Forgive my redundancy, I just posted a thread with the same content, but a different issue, so I figured this should be a new thread.
So I have spreadsheet with 12 monthly tabs of employee performance. For example, the January tab has empID in column A, and "time to complete a certain task" in columns B-AZ. These tasks are grouped (without any empirical identifier) into 10 "parent groups". For example, columns B-C are "Group 1", columns D-J are "Group 2", etc...
Not all employees work each month, so I have a summary tab that contains all possible empIDs in column A, and then 10 columns for each "parent group", for each month (column B-K are for Jan, J-n for Feb, etc...). The expected results for each cell is the AVERAGE of the groups' times, per month. For example, if the empID in A2 is within the Jan array (if they worked in Jan); B2 = AVERAGE of Jan, "Group 1" times; B3 = AVERAGE of Jan, "Group 2" times; et cetera for all 10 "groups", and then repeated for each month.
I was able to achieve this in the summary tab, but only by inserting 10 new columns for each "group", in each month tab, that calculates those averages. I then just did a VLOOKUP for the empIDs and returned values if found: =IFERROR(VLOOKUP($A2,'January'!$C$4:$AW$250,6,FALSE),"-").
Again, I have a solution in place, but it would be nice to not alter the raw data with new columns. With the way the data was initially formatted, is there a way to do a VLOOKUP that returns calculations (IF found, return AVERAGE(this cell:this cell)), instead of just a column reference (like "6" in the formula above)? Or should I abandon VLOOKUP altogether and go another route?
Bookmarks