Condiction formule if date in rage

webdevptg

Board Regular
Joined
May 2, 2019
Messages
51
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Web
I have begin date in B2 cell and end dae in a cell C2. I want to obtain the value yes, if the begin date is between the 18th of the previous month and the 17th of the month of the end date. The verify end date is the 29th of the month.

Example:
Sample.png


I've tried several ways, but it never validates all the possibilities


Can you help me?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Edit: suggested formula was not quite right.

Edit: Try this:

Book1 1-25-2024.xlsm
BCD
1Begin DateFinish Date
212/18/20231/28/2024Yes
312/18/20231/29/2024Yes
412/18/20231/30/2024Yes
512/15/20231/18/2024Yes
612/15/202312/28/2023Yes
71/15/20241/28/2024Yes
81/15/20241/30/2024Yes
Sheet12
Cell Formulas
RangeFormula
D2:D8D2=IF(AND(B2>DATE(YEAR(EDATE(B2,-1)),MONTH(EDATE(B2,-1)),18),B2<DATE(YEAR(C2),MONTH(C2),17)),"Yes","No")
 
Upvote 0
hI!
Formula in cells D4; D5 and D8

This is partially correct, the formulas in the cells D4; D5 and D8 cells must, return the value in the no
  • D4 - Finish date is greather than 1/29/2024
  • D5 - Finish date is greather than 12/29/2023
  • D8 - Finish date is greather than 1/29/2024
 
Upvote 0
I have begin date in B2 cell and end dae in a cell C2. I want to obtain the value yes, if the begin date is between the 18th of the previous month and the 17th of the month of the end date. The verify end date is the 29th of the month.

hI!
Formula in cells D4; D5 and D8

This is partially correct, the formulas in the cells D4; D5 and D8 cells must, return the value in the no
  • D4 - Finish date is greather than 1/29/2024
  • D5 - Finish date is greather than 12/29/2023
  • D8 - Finish date is greather than 1/29/2024
You didn't say how the "verify end date" affects the outcome... the only conditions you supplied are these:

"begin date is between the 18th of the previous month and the 17th of the month of the end date."

And D5 (12/28/2023) is NOT greater than 12/29/2023.. at least not by your sample data.

Please explain how the 29th of the month should affect the result.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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