School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,418 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,561 people online right now. Registration is fast and FREE... Join Now!




Nested If in Excel?

 

Nested If in Excel?

mastermikeyboy

18 Jun, 2009 - 05:43 AM
Post #1

New D.I.C Head
*

Joined: 26 Nov, 2008
Posts: 8

Im trying to do a crossreference phonenumbers from different spreadsheets (one file).
So I have a nested if statement but it will only do the first statement the and not the 'else if' when it has to.

here is the code:
CODE
=IF(MATCH($B1,Sheet2!B:B,0),"Don't call", IF(MATCH($B1,Sheet3!B:B,0),"Seen","Call"))

I either get 'Don't call' or '#N/A' as result

Please note that I don't know how to create these functions in Excel and that I made this one by what I could find on the internet.

Edit; 11:34am June18

After trying a lot of code I got this:
CODE
=IF(ISNA(IF(MATCH($B1,Sheet2!B:B,0),"Don't call","")),IF(ISNA(IF(MATCH($B1,Sheet3!B:B,0),"Seen","")), "Call", IF(MATCH($B1,Sheet3!B:B,0),"Seen","")),IF(MATCH($B1,Sheet2!B:B,0),"Don't call",))


Seems to work so far, let me know if I could shorten it up or something:)


This post has been edited by mastermikeyboy: 18 Jun, 2009 - 06:36 AM

User is offlineProfile CardPM
+Quote Post


woodjom

RE: Nested If In Excel?

18 Jun, 2009 - 12:38 PM
Post #2

D.I.C Regular
Group Icon

Joined: 8 May, 2008
Posts: 365



Thanked: 15 times
My Contributions
Your Original:
CODE
=IF(MATCH($B1,Sheet2!B:B,0),"Don't call", IF(MATCH($B1,Sheet3!B:B,0),"Seen","Call"))


Your Edited version:
CODE
=IF(ISNA(IF(MATCH($B1,Sheet2!B:B,0),"Don't call","")),IF(ISNA(IF(MATCH($B1,Sheet3!B:B,0),"Seen","")), "Call", IF(MATCH($B1,Sheet3!B:B,0),"Seen","")),IF(MATCH($B1,Sheet2!B:B,0),"Don't call",))



Suggested coding:
CODE
=If(Match($B1,Sheet2!B:B,0),IF(MATCH($B1,Sheet3!B:B,0),"Seen","Call"),"Don't Call")


sometimes your decision tree isnt correctly being evaluated so you have to flip it. See if this is working for ya?

Also, have you tried assigning row numbers to it for testing to make sure its actually iterating through the whole column? If its not, you may need to go from B to C to catch the whole column. Excel tends to be quirky like that.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 11:37PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month