Getting Unexpected Results using AND function

JAlbers

Board Regular
Joined
Sep 9, 2011
Messages
60
Greetings all.

I have a column of dates in a table that I am wanting to make selections from. My selection I think is relatively straight forward and none to complex (or I wouldn't have come up with it) =AND($A4>= BegDate,$A4<=EndDate) This is returning FALSE even when A4 is clearing between the beginning and ending dates.

I have tried writing the formula manually using the actual dates and get the same response "FALSE". I must be missing something but I do not see what it is.

Any help would be greatly appreciated!

Thanks

Jake
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You formula (modified)

=AND($A4>= DATE(2012,1,1),$A4<=DATE(2012,12,31))

seems to work if A4 contains =TODAY()

Check your data as the formula looks good.
 
Upvote 0
All all of those values Excel serial dates (i.e., do they appear as numbers when formatted as General)?

Is BegDate <= EndDate?
 
Upvote 0
Sorry Peter, looks like you were locking the thread just as I was merging the two. I have merged them, and re-opened the single, combined thread.
 
Upvote 0
Yes, the numbers are all numeric when formatted as General. And Endate is calculated as BegDate + 6.
 
Upvote 0
Not sure if it is this simple but the formula you copied in above has a space before Begdate.

Cheers, :)
 
Upvote 0
You formula (modified)

=AND($A4>= DATE(2012,1,1),$A4<=DATE(2012,12,31))

seems to work if A4 contains =TODAY()


Check your data as the formula looks good.
I'm not sure how to get the dates formatted this way when using the date input into VBA which are stored as my variables BegDate & EndDate
 
Upvote 0

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

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