IF function issue

JoeG2124

New Member
Joined
Sep 1, 2017
Messages
8
I am having trouble adding one line to an IF function.

I have learned that I can use up to 7 IF functions in a formula.
My goal here is to get the difference between two dates and depending on the answer, the cell gives the green/amber/red answer.
I have figured out my main goal, but got a curveball thrown to me..... some of the cells don't have a date, but say "N/A" and I need that to return a "green" answer.

I feel like I have tried to put it everywhere and it doesn't work. Let me just say that my "training" is from reading this message board. I just happened to know a few things and now I am the group "expert" at work and need to create all the spreadsheets.

These are the two formulas I need to incorporate for the first - "IF(E32="N/A", "Green")
for the second - "IF(M32="N/A", "Green")

=IF(E32,IF(F32,
IF(F32-E32<=365, "Green",
IF(F32-E32<=456, "Amber",
"Red")),
IF(TODAY()-E32<=365, "Green",
IF(TODAY()-E32<=456, "Amber",
"Red"))),"")

=IF(M32,IF(O32,
IF(O32-M32<=0, "Green",
"Red"),
IF(TODAY()-M32<=0, "Green",
"Red")),"")
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
you can use more than 7 IF your excel is later than 2003 version
 
Upvote 0
I only come here when I truly can't figure things out. I might be better at this than I think because these are the type of responses I always get. Just some non-sense that isn't helpful.

I assume that post was made to get this off the "zero reply posts" page?
 
Upvote 0
I only come here when I truly can't figure things out. I might be better at this than I think because these are the type of responses I always get. Just some non-sense that isn't helpful.

I assume that post was made to get this off the "zero reply posts" page?
Why do you say that? We don't just make replies to get it off of "Zero Reply Posts".

He answered that addressed your issue:
I have learned that I can use up to 7 IF functions in a formula.

That is not an accurate statement, as he responded:
you can use more than 7 IF your excel is later than 2003 version

So he is telling you that IF is available to you.
 
Upvote 0
I only come here when I truly can't figure things out. I might be better at this than I think because these are the type of responses I always get. Just some non-sense that isn't helpful.

I assume that post was made to get this off the "zero reply posts" page?

The reason I phrased it as such is you might be working in 2003 in which case you are normally restricted to the 7. Knowing the version is helpful in determining what would be appropriate as an answer.
 
Upvote 0
It seems like you have a lot going on here. And some parenthesis' that don't need to be there. Here is my 2 cents. Please note it is untested.

OP Requirements;
These are the two formulas I need to incorporate for the first - "IF(E32="N/A", "Green")
for the second - "IF(M32="N/A", "Green")

Code:
=IF(E32="N/A","Green",IF(OR(TODAY()-E32<=365,F32-E32<=365),"Green",IF(AND(F32-E32>365,F32-E32<=456),"Amber",IF(AND(TODAY()-E32>365,TODAY()-E32<=456),"Amber","Red"))))

Code:
=IF(M32="N/A","Green",IF(OR(O32-M32<=0,TODAY()-M32),"Green","Red"))

This was a little confusing since you have closed out an IF statement, and the immediately ran a new one outside of the FALSE logic. I have combined the second IF sequence using a OR statement as they seemed to be doing the exact same thing.

Please elaborate more on the first sequence.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top