Values based on Date in 2 columns

murexcel

New Member
Joined
Jan 4, 2020
Messages
19
Office Version
  1. 2010
Platform
  1. Windows
Hi, I'm trying the below formula for changing the start & stop text based on dates. What we want is that if the start date is tomorrow, it should show START. If the stop date is tomorrow, it should show STOP today.

Some times we enter dates 1 week prior & we want the data to change a day prior.

SAMPLE DATA-ETAF-2.xlsx
ABC
1Start DateStop DateMeal 1 - ORDER
201-05-2307-05-23STOP
301-06-2301-08-23STOP
404-05-2305-05-23STOP
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=IF(AND(TODAY()>=$A2-1,TODAY()<$B2-1),"START", "STOP")



Appreciate the help.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Question being, what should it say if both conditions are false?
 
Upvote 0
Try

=IF(TODAY()+1=A2,"START",IF(TODAY()+1=B2,"STOP","CHECK DATE"))
 
Upvote 0
If you put date for tomorrow it still shows CHECK DATE, but it should be STOP.

SAMPLE DATA-ETAF-2.xlsx
ABC
1Start DateStop DateMeal 1 - ORDER
201-05-2308-05-23CHECK DATE
301-06-2301-08-23STOP
404-05-2305-05-23STOP
Sheet1
Cell Formulas
RangeFormula
C2C2=IF(TODAY()+1=A2,"START",IF(TODAY()+1=B2,"STOP","CHECK DATE"))
C3:C4C3=IF(AND(TODAY()>=$A3-1,TODAY()<$B3-1),"START", "STOP")
 
Upvote 0
Main purpose is that the value should show START between the Start Date & Stop Date, else it should show STOP. But it should reflect a day prior.

If the start date is greater than the stop date or vice versa, it should show CHECK DATE.
 
Upvote 0
Main purpose is that the value should show START between the Start Date & Stop Date, else it should show STOP. But it should reflect a day prior.

If the start date is greater than the stop date or vice versa, it should show CHECK DATE.
In my opinion, what you have stated does not make sense. In the above, the first line is logical and the formula that drives that is the one that you originally posted. However, the second line will always show "Check Date", as you will need to put this "IF" statement in first, so the formula will stop if this strue, which it will always be.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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