• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

If Statement, Nested Best option [SOLVED]

Hello, I have a spreadsheet with two tabs. Tab one has a value that is brought in from tab 2 using =IF('Tab2 '!B23<>"#DIV/0!",Tab2'!B23,"-") Oridinarily this would work just fine, however my problem is that the data in Cell B23 is a formula of =B21/B22*100 which will return the solution of #DIV/0!. I need the cells where my if statement is on tab one to say either an actual number is one is returned eg. =1-2*100=50 or - if the answer is #DIV/0!. I have tried Nested IfAnds, IfErrors, Conditional formatting.... Nothing has worked. I can get all of it to do one piece or the other but not both. Any help is greatly apprecaited.
 
Hi, ireland13752!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


And about this question in particular...


I'd replace the orginal formula by this:

=IF('Tab2'!B22<>0,'Tab2'!B23,"-")

it's easier to test the original cell that causes the error than a chained dependent one.

You may also use this:

Version 2007+: =IFERROR('Tab2'!B23,"-")

Version 2003-: =IF(ISERROR('Tab2'!B23),"-",'Tab2'!B23)


Regards!
 
I apologize for missing the introduction. My Name is Samantha. I am extremely grateful for your help! I spent about 3 hours trying and searching for a solution to this and was unsuccessful, however your first suggestion worked perfectly! I cannot thank you enough! I was able to input the formula set my conditional formatting and test with complete success! Thank you again!
 
Hi, ireland13752!

Glad you solved it. Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.

Regards!

PS: It'd be nice if you introduce yourself at the 1st green sticky topic which is where all the new members (should) say hi!

PS2: BTW, as from The Chieftains' lands you're hereby forgiven :)
 
Hi Samantha,


Just as an alternative you could put the error check in cell B23 on Tab2


Version 2007+ : =IFERROR(B21/B22*100,"-")

Version 2003- : =IF(ISERROR(B21/B22*100), "-",B21/B22*100)


Then on Tab1


='Tab2'!B23
 
Back
Top