Computing.Net > Forums > Office Software > using multiple if conditions

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

using multiple if conditions

Reply to Message Icon

Name: raorajarati
Date: April 1, 2009 at 21:22:24 Pacific
OS: Windows XP
Subcategory: Microsoft Office
Comment:

would like to use if condition in excel. I have to use logical test for 15 names and 4 values i.e, criteria?
In one column I have 15 dealer names. I want to use if condition for these 15 names with 4 criteria. if i enter any one dealer name, criteria is trans, if I enter 1 then it is IN, if I enter 0 then it is NA and if I enter any other, it should be sale. please help me



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: April 2, 2009 at 06:22:32 Pacific
Reply:

Is this what you are looking for?

With your list in A1:A15 and yoru data entry in B1, try this formula:

=IF(B1=1,"IN",IF(B1=0,"NA",IF(NOT(ISERROR(VLOOKUP(B1,$A$1:$A$15,1,0))),"trans","sale")))


0

Response Number 2
Name: raorajarati
Date: April 2, 2009 at 21:42:12 Pacific
Reply:

Hi Thank u for your answer. But I got the result with IF(OR....). Thank you very much once again for your kind response.

With regards,

Gururaj Rao


0

Response Number 3
Name: DerbyDad03
Date: April 3, 2009 at 03:28:57 Pacific
Reply:

Please share your solution.

I'm just curious as to how you did it.


0

Response Number 4
Name: raorajarati
Date: April 3, 2009 at 04:37:26 Pacific
Reply:

Hi here is the formula which I used.

=IF(F2=1,"IN", IF(F2=0,"NA",IF(OR(F2="KUNDAPUR",F2="BARKURI",F2="BELMAN",F2="BENAKA",F2="BHUMEGA",F2="HEBRI",F2="JJ MALPE",F2="N S MOTORS",F2="SALIGRAMA",F2="SHANTHA",F2="SHIRALI",F2="V2 BYNDOOR",F2="UDUPI"),"TRANS","SALES")))

Thanx

with regards,
Gururaj Rao


0

Response Number 5
Name: angrymen2001
Date: April 3, 2009 at 04:43:44 Pacific
Reply:

IN case you're still monitoring, As the respondee mentioned Vlookup would have been easier.
Either way works, however if you wanted to add other entries the VLookup would be quicker/ easier method
Just an FYI for you

What happened to my quote


0

Related Posts

See More



Response Number 6
Name: DerbyDad03
Date: April 3, 2009 at 12:18:36 Pacific
Reply:

Not to mention 226 characters vs 88.

While not a huge difference on a one-off basis, I wouldn't want a spreadsheet full of long, hardcoded formulae.

There's also a much higher chance of making a typo since you have to duplicate each name in the list by typing it into the formula.

With a longer list, you could possibly exceed the character limit allowed in a formula.

And last, but certainly not least,

IF(NOT(ISERROR(VLOOKUP(B1,$A$1:$A$15,1,0)))

looks so much cooler than IF(OR(text,text,text, etc.)

;-)


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: using multiple if conditions

If condition in excel www.computing.net/answers/office/if-condition-in-excel/5051.html

If condition in excel www.computing.net/answers/office/if-condition-in-excel/5070.html

Multiple If/And statemtn in EXCEL www.computing.net/answers/office/multiple-ifand-statemtn-in-excel/5841.html