MSGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### 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

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

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

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

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

4 Replies
401 Views

Similiar Articles:

7/25/2012 11:34:47 PM