Hi Guys,
I am trying to achieve the following -
On sheet 2 I have a list of names and positions in column A and B - eg
Col A Col B
Peter Accountant
Paul Engineer
Mark Accountant
John Accountant
Simon Engineer
On sheet 3 I have a list of names (all of which appear in sheet 2) and costs - eg
Col A Col B
Peter $10
Paul $5
Peter $12
Peter $7
Simon $10
Peter $25
Simon $15
On sheet 1 should be a total cost for Engineers and Accountants. Eg the cell next to Engineer in Sheet 1 should have a formula in it that looks at all the names in Column A of Sheet 3, compares each name to Column A Sheet 2, determines if there position in Col B is Engineer then it adds the value in Sheet 3 Column B.
I can achieve this if I put I insert a Column in sheet 3 between the names and the costs, then in this cell I perform a VLOOKUP on the name and it returns a position in the cell. I can then tell sheet 1 to SUMIF the new column in Sheet 3 has Engineer in it.
The thing is I don't want that additional column to be added. The data comes in each month and I don't want anyone to have to add the column I would just like them to copy the Sheet 1 into the workbook and have it all work from there.
Esentially I need something like this on sheet 1
=SUMIF(VLOOKUP('Sheet3'!A2:A10, 'Sheet2'!A2:A10, 2, FALSE), "Engineer", 'Sheet3'!B2:B10)
except this does not work (presumably because you can't enter a range for VLOOKUP).
Many thanks.
Bookmarks