View Single Post
 
Old 06-01-2013, 10:56 PM
Scheuerman1987 Scheuerman1987 is offline Windows Vista Office 2013
Novice
 
Join Date: May 2013
Location: Corona, CA
Posts: 4
Scheuerman1987 is on a distinguished road
Default

Quote:
Originally Posted by BobBridges View Post
Ok, just checking. So the first IF function is supposed to check $B$17; if it's blank, then the IF statement should return a blank, otherwise it should do a VLOOKUP in some table for the value in $B$17. The IF, then, says

=IF($B$17="","",lookup)

I don't know what the exact VLOOKUP is, but let's pretend it looks like this:

=VLOOKUP($B$17,OtherWorksheet!$A:$C,3,0)

(That searches in column A of a worksheet named OtherWorksheet, looking for a value that matches $B$17 in this worksheet; if it finds a match in A27 (say), then it returns the value in C27.)

To combine them is simple; you just put the VLOOKUP call inside the IF call, where I wrote "lookup" before, like this:

=IF($B$17="","",VLOOKUP($B$17,OtherWorksheet!$A:$C ,3,0))

Note that you don't duplicate the '='; that's not actually part of the function call, it only introduces to Excel that you're about to do a calculation of some kind. But everything else is copied exactly, including all the parentheses.

Make sense?
Thank you so much for explaining how to nest these two functions together. It made it a lot easier for me to figure out this assignment and complete it!! I always get confused when it comes to nesting. I had never seen these two functions used together. I don't think my text book explained nesting very well either.
Reply With Quote