ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If within an If... (https://www.excelbanter.com/excel-programming/326406-if-within-if.html)

Darin Kramer

If within an If...
 
Howdie,

My current if states

IF(F56="","",(VLOOKUP(N56,$A$56:$E$200,5,0)))

I now want to add the condition that if cell p56=10.1 then instead of
doing the vlookup on N56, do it on P56.

So Basically three condions
1)if F56 is blank, put blank
2)If F56 is not blank, then is P56 = "10.1"? If P56 is equal to 10.1, do
do the Vlookup on P56, and if its not equal to 10.1 do the Vlookup on
N56
Note Both conditions can not be true, ie P56 can not be 10.1 and f56 be
blank at the same time. Range is always the same.

Whats the new all encompassing IF ? :)

Confusing..? hope not!




*** Sent via Developersdex http://www.developersdex.com ***

Paul Black[_2_]

If within an If...
 
Hi Darin,

Try this :-

=IF(F56="","",IF(P56=10.1,VLOOKUP(P56,$A$56:$E$200 ,5,0),VLOOKUP(N56,$A$5
6:$E$200,5,0)))

All the Best.
Paul



From: Darin Kramer

Howdie,

My current if states

IF(F56="","",(VLOOKUP(N56,$A$56:$E$200,5,0)))

I now want to add the condition that if cell p56=10.1 then instead of
doing the vlookup on N56, do it on P56.

So Basically three condions
1)if F56 is blank, put blank
2)If F56 is not blank, then is P56 = "10.1"? If P56 is equal to 10.1, do
do the Vlookup on P56, and if its not equal to 10.1 do the Vlookup on
N56
Note Both conditions can not be true, ie P56 can not be 10.1 and f56 be
blank at the same time. Range is always the same.

Whats the new all encompassing IF ? :)

Confusing..? hope not!




*** Sent via Developersdex http://www.developersdex.com ***

Mangesh Yadav via OfficeKB.com

If within an If...
 
=IF(F56="","",if(P56=10.1,(VLOOKUP(P56,$A$56:$E$20 0,5,0)),(VLOOKUP(N56,$A
$56:$E$200,5,0))))

- Mangesh

--
Message posted via http://www.officekb.com

Darin Kramer

If within an If...
 


Thanks, works perfectly

Do you perhaps know how to say if cell A1 is text, then ignore, if its a
number then multiply by 1.
(I need to run only on numbers not on text that is within the sample..)



*** Sent via Developersdex http://www.developersdex.com ***

Paul Black[_2_]

If within an If...
 
Hi Darin,

Try this ( Puts a BLANK if it is TEXT ) :-

=IF(ISNUMBER(A1),A1,"")

All the Best.
Paul



From: Darin Kramer

Thanks, works perfectly

Do you perhaps know how to say if cell A1 is text, then ignore, if its a
number then multiply by 1.
(I need to run only on numbers not on text that is within the sample..)




*** Sent via Developersdex http://www.developersdex.com ***

Tom Ogilvy

If within an If...
 
Numbers only match numbers, so it is implicit if your lookup value is a
number.

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote in message
...


Thanks, works perfectly

Do you perhaps know how to say if cell A1 is text, then ignore, if its a
number then multiply by 1.
(I need to run only on numbers not on text that is within the sample..)



*** Sent via Developersdex http://www.developersdex.com ***





All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com