If Date is between

JasmineL

Active Member
Joined
Jan 7, 2003
Messages
299
I've done this formula a million times in other positions and I can't remember for the life of me the correct ordering.

Here's what I have:

1) Actual Date ($D4)
2) Beginning Date (F1)
3) Ending Date (F2)

What I need:
If Actual Date is on or later than beginning date and before or on ending date, enter ok, otherwise blank.

I know the formula is something like:
=IF(AND(F1>=$D4,$D4<=F2),"ok","")

I think I have the ordering off because right now my formula is returning "ok" for when the actual date is 3/11/11 and the beginning/ending dates are 4/1/11 and 4/30/11 respectively.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
This is what I had before, but for some reason, the formula fills "ok" in the february column, even if the actual dates do not fall in february...thoughts? I wonder if it's a leap year thing.
 
Upvote 0
Disregard, I changed my end Feb date to 2/28/2011 and everything corrected. How do you handle leap year?
 
Upvote 0
Excel has its own internal clock and calendar. It recognizes leap year as occuring in 2012 and will list it as part of a given date sequence. ..so I'm not sure what you mean by "how do you handle" leap year.
 
Upvote 0

Forum statistics

Threads
1,224,544
Messages
6,179,430
Members
452,915
Latest member
hannnahheileen

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