More On Excel: - Presentation by Soma Gupta
More On Excel: - Presentation by Soma Gupta
In Column C we want to show the grade based on marks. We do this by looking into the
marks, comparing it to the Grading Scale table, and returning the grade using VLOOKUP.
Here is the VLOOKUP in layman’s syntax
=IF(ISNA(VLOOKUP(B6,$E$2:$F$7,2,TRUE)),0,
(VLOOKUP(B6,$E$2:$F$7,2,TRUE)))
The Logical_test checks the conditions to see if an #N/A will result. We complete that
by putting our original VLOOKUP in the ISNA function. If the value is #N/A, it will
return a TRUE.
If our VLOOKUP in the Logical_test produces an #N/A (TRUE), we know that there is
no grade associated with the marks in the Grading Scale table. We set the
Value_if_true to ZERO.
If our VLOOKUP in the Logical_test produces a valid result, the Logical_test will be
FALSE (Is not #N/A). Therefore, we can proceed with the original VLOOKUP formula
in the Value_if_false field to perform the data query.
HLOOKUP
HLOOKUP is kin to VLOOKUP. VLOOKUP looks up a value from a Vertical list and HLOOKUP looks up a value
from a Horizontal list. Here is a quick tutorial on the HLOOKUP function.
In this picture we have a list of People and their respective Sales and a Table showing the Bonus they get if
they hit a certain target.
In Column C we want to show the bonus based on sales. We do this by grabbing the Sales, comparing it to
the Bonus Target table, and returning the bonus amount using HLOOKUP.
Here is the HLOOKUP in layman’s syntax