In an IF argument, can I mix numeric criteria with character? Formula example
=IF(OR(Coders!AF2-Coders!W2=0,Coders!W2="No Entry"),"No","Yes")
returns correctly, except when W2="No Entry" then it returns #VALUE!
Is there a way around this?
Mad
In an IF argument, can I mix numeric criteria with character? Formula example
=IF(OR(Coders!AF2-Coders!W2=0,Coders!W2="No Entry"),"No","Yes")
returns correctly, except when W2="No Entry" then it returns #VALUE!
Is there a way around this?
Mad
Maybe this...
=IF(OR(Coders!AF2-N(Coders!W2)=0,Coders!W2="No Entry"),"No","Yes")
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Formula:Please Login or Register to view this content.
When Coders!W2 has "No Entry" in it, you cannot subtract that value from Coders!AF2
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
I would do this:
=IF(Coders!W2="No Entry","No",IFERROR(IF(Coders!AF2-Coders!W2=0,"No","Yes"),"No"))
Your error has nothing to do with an IF; you are trying to do arithmetic on a text string and getting an error. Here's the long version:
In an IF here are the arguments
IF([condition],[result when condition is TRUE],[result when condition is FALSE])
So [condition] is any expression that evaluates to either TRUE or FALSE.
Similarly in OR
OR([condition1], [condition2], [condition3],....[conditionn])
where each [conditionx] evaluates to TRUE or FALSE.
Your OR function has this as a condition
Coders!AF2-Coders!W2=0
If W2 is "No Entry" then it doesn't make sense to do arithmetic on it. I would suggest this:
=IF(Coders!W2="No Entry","No",IF(Coders!AF2-Coders!W2=0,"No","Yes"))
If W2 is not "No Entry" but is some other text instead you will still get an error. So you could do this to cover all your bases:
=IF(Coders!W2="No Entry","No",IFERROR(IF(Coders!AF2-Coders!W2=0,"No","Yes"),"No"))
AWESOME! That worked and you explained IFERROR too. Thanks so much for your help.
Glad to help, and thanks for the rep.
Also thanks for remembering to mark your thread SOLVED.
I would like to use this formula in a VLOOKUP. How would I modify it? I have trouble with nesting conditions.
=VLOOKUP(f2,Coders!F:AB,(=IF(Coders!W2="No Entry","No",IFERROR(IF(Coders!AF22-Coders!W2=0,"No","Yes"),"No"))),False)
or, should I submit a new request?
Mad
That's not the correct syntax for VLOOKUP. You stuck that big IF formula in where VLOOKUP is expecting a positive number. What you need to accomplish with your VLOOKUP?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks