=IF(G6="Y",IFERROR(VLOOKUP(F6,'[Section Data]Section Data'!$B$6:$E$9,4,0),""),0)
I have attached my spreadsheet below, in case you don't understand my description.
I have a sheet called "Staff" and I need the cell V6, in a column called "Parking Fee" to:
- Find out what section the staff member works in, found on the same row as the Parking Fee data in cell F6
- Match this value (which could be either management, sales, accounts or manufacture) with the data on sheet "SectionData"
- Get the parking fee depending on what section the employee works in and display this data in sheet "Staff", cell V6
However, this data can only be displayed if cell G6 of sheet "Staff" says "Y" (Yes, that employee rents a parking space).
I hope that made sense. I think an IF statement with a VLOOKUP statement inside it should work, but it isn't.
Bookmarks