Nested IF statement

  • Follow


I am trying to do a nested if statement with VLookup function.  Here is an 
example:

=IF(C156="NJ",(VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE))),IF(C156="JAM",(VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))

Not sure what i am doing wrong.  the first statement works (Nigel).  for the 
second one i get #VALUE

can someone help me?  thanks
0
Reply Utf 2/25/2010 4:58:08 PM

You have too many unnecessay  ( ).

=IF(C156="NJ",VLOOKUP($A156,Nigel!$A$10:$S$24,8,0),IF(C156="JAM",VLOOKUP($A156,Jam!$A$10:$S$24,8,0),""))

-- 
Biff
Microsoft Excel MVP


"Mary Lou" <MaryLou@discussions.microsoft.com> wrote in message 
news:8BC2B046-6083-4A18-9170-3B648B6CF3B8@microsoft.com...
>I am trying to do a nested if statement with VLookup function.  Here is an
> example:
>
> =IF(C156="NJ",(VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE))),IF(C156="JAM",(VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
>
> Not sure what i am doing wrong.  the first statement works (Nigel).  for 
> the
> second one i get #VALUE
>
> can someone help me?  thanks 


0
Reply T 2/25/2010 5:09:47 PM


Mary Lou wrote:
> I am trying to do a nested if statement with VLookup function.  Here is an 
> example:
> 
> =IF(C156="NJ",(VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE))),IF(C156="JAM",(VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
> 
> Not sure what i am doing wrong.  the first statement works (Nigel).  for the 
> second one i get #VALUE
> 
> can someone help me?  thanks


Try this:

=IF(C156="NJ",VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE),IF(C156="JAM",VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
0
Reply Glenn 2/25/2010 5:14:21 PM

THANK YOU - PERFECT!!!  

"Glenn" wrote:

> Mary Lou wrote:
> > I am trying to do a nested if statement with VLookup function.  Here is an 
> > example:
> > 
> > =IF(C156="NJ",(VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE))),IF(C156="JAM",(VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
> > 
> > Not sure what i am doing wrong.  the first statement works (Nigel).  for the 
> > second one i get #VALUE
> > 
> > can someone help me?  thanks
> 
> 
> Try this:
> 
> =IF(C156="NJ",VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE),IF(C156="JAM",VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
> .
> 
0
Reply Utf 2/25/2010 7:54:01 PM

You're welcome!

Mary Lou wrote:
> THANK YOU - PERFECT!!!  
> 
> "Glenn" wrote:
> 
>> Mary Lou wrote:
>>> I am trying to do a nested if statement with VLookup function.  Here is an 
>>> example:
>>>
>>> =IF(C156="NJ",(VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE))),IF(C156="JAM",(VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
>>>
>>> Not sure what i am doing wrong.  the first statement works (Nigel).  for the 
>>> second one i get #VALUE
>>>
>>> can someone help me?  thanks
>>
>> Try this:
>>
>> =IF(C156="NJ",VLOOKUP($A156,Nigel!$A$10:$S$24,8,FALSE),IF(C156="JAM",VLOOKUP($A156,JAM!$A$10:$S$24,8,FALSE)))
>> .
>>
0
Reply Glenn 2/25/2010 9:03:28 PM

4 Replies
401 Views

(page loaded in 0.107 seconds)

Similiar Articles:
















7/25/2012 11:34:47 PM


Reply: