Solved Multiple IFs in Excel

November 10, 2020 at 00:14:56
Specs: Windows 10
Please help. I need a formula in C1 for all of these conditions:

If A1 is blank AND the date in B1 is three days in the past, C1 shows "Contact the Customer"
If A1 is blank AND the date in B1 is one or two days in the past, C1 shows "Warning"
If A1 is blank AND the date in B1 is the current date, C1 shows "Good"

Thank you

message edited by CuriousChris


See More: Multiple IFs in Excel


✔ Best Answer
November 10, 2020 at 17:50:18
Here is a variation on the above formula:

=IF(A1<>"","",IF(B1=TODAY(),"Good",IF(OR(B1=TODAY()-2,B1=TODAY()-1),"Warning",IF(B1=TODAY()-3,"Contact the Customer",""))))

Not quite as long.

MIKE

http://www.skeptic.com/



#1
November 10, 2020 at 05:07:41
What should C1 show when A1 isn't blank?

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code

message edited by DerbyDad03


Reply ↓  Report •

#2
November 10, 2020 at 07:15:41
C1 should show "do not include" if A1 has a value.

Reply ↓  Report •

#3
November 10, 2020 at 09:44:34
I should have asked this also:

What happens if B1 is in the future?

What happens if B1 is greater than 3 days in the past?

We can't see your worksheet from where we're sitting nor do we know anything about your work processes, so you need to tell us how to handle every situation that might occur with A1 & B1. If we make assumptions, we'll be wasting our time and yours.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code

message edited by DerbyDad03


Reply ↓  Report •

Related Solutions

#4
November 10, 2020 at 10:45:47
To clarify my condition, if the date in B1 is 3 or more days from the current date, the alert will still be "Contact the Customer". If 1 to 2 days from the current date, it should show "Warning" and if the date is the same as the current date, the message is "Good".

Reply ↓  Report •

#5
November 10, 2020 at 12:54:03
I think you just made it more confusing.

"if the date in B1 is 3 or more days from the current date"

"If 1 to 2 days from the current date"

What do you mean by "from the current date? Before it? After it? Both?

Perhaps you should post some example dates and the expected outcome based on those exact dates.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •

#6
November 10, 2020 at 17:38:19
Try this very log solution, it does very little error checking but should give you what your looking for.

It is long,so it would be best to copy/paste.

=IF(AND(A1="",B1=TODAY()),"Good",IF(AND(A1="",OR(B1=TODAY()-2,B1=TODAY()-1)),"Warning",IF(AND(A1="",B1=TODAY()-3),"Contact the Customer","")))

If you want a bit more Color, have a look at these two HOW-TO's that use Conditional Formatting.

https://www.computing.net/howtos/sh...

https://www.computing.net/howtos/sh...

MIKE

http://www.skeptic.com/


Reply ↓  Report •

#7
November 10, 2020 at 17:50:18
✔ Best Answer
Here is a variation on the above formula:

=IF(A1<>"","",IF(B1=TODAY(),"Good",IF(OR(B1=TODAY()-2,B1=TODAY()-1),"Warning",IF(B1=TODAY()-3,"Contact the Customer",""))))

Not quite as long.

MIKE

http://www.skeptic.com/


Reply ↓  Report •

#8
November 11, 2020 at 06:33:52
Mike:

Please refer to Response #2: "C1 should show "do not include" if A1 has a value."

CuriousChris:

I believe that this formula gets you what you asked for, as long as there is no need to address dates that are in the future.

=IF(A1<>"","Do Not Include",IF(B1=TODAY(),"Good",IF(B1<TODAY()-2,"Contact the Customer","Warning")))

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •

#9
November 11, 2020 at 07:02:11
DerbyDad03

Missed #2, but your modification seems to cover that.

MIKE

http://www.skeptic.com/


Reply ↓  Report •

Ask Question