Good morning,
The hint information implies that you should use 2 vlookups, but that's not really necessary. The following will work:
=VLOOKUP([@[Group Code]],RentalCharges,IF([@[Rental Period]]=3,2,3),FALSE)
The table with rental charges breaks 3 months and 9 months down, but in different columns. For items rented for 3 months, the vlookup needs to pull column 2, and for 9 months, column 3. This could be accomplished several ways. The book describes something like:
= if ( rental period = 3, vlookup( group code , rental period, 2 , false) , if ( rental period = 9, vlookup( group code , rental period, 3 , false) , [something else if false....???] ))
This would have a nested if and 2 vlookups, but you don't need that here...
Since the only thing modifying the vlookup is the column selection, I put the if inside the vlookup:
=VLOOKUP([@[Group Code]],RentalCharges,IF([@[Rental Period]]=3,2,3),FALSE)
So, if rental period = 3, the column reference is 2, otherwise it's 3 (because 9 is the only other alternative.
Hopefully this helps.
Best of luck,
Bookmarks