Data Validation -- Dates

P

pdberger

Good afternoon --

I'd like to limit entries in a column to dates in the current month. I'm
using the Data Validation > Dates > Between approach. My first date works
fine:

=DATE(YEAR(TODAY()),MONTH(TODAY()),1)

My ending date formula works fine in the spreadsheet but, when I copy it
into the data validation box, it gives me an error message. Here's the
formula:

=EOMONTH(TODAY(),0)

The error message says I can't make reference to other worksheets or
workbooks.

Can someone point me in the right direction (as befuddled as I may be)?

Thanks in advance.
 
P

Peo Sjoblom

Try

=DATE(YEAR(TODAY()),MONTH(TODAY())+1,0)


the reason EOMONTH does not work is because it is part of an add-in and it
resides in another workbook

the above formula returns the same result as EOMONTH

--


Regards,


Peo Sjoblom
 
P

pdberger

Works great! A big thanks to the wizard.

Peter

Peo Sjoblom said:
Try

=DATE(YEAR(TODAY()),MONTH(TODAY())+1,0)


the reason EOMONTH does not work is because it is part of an add-in and it
resides in another workbook

the above formula returns the same result as EOMONTH

--


Regards,


Peo Sjoblom
 
T

T. Valko

Excel never seems to follow any standards!

Insert>Name>Define
Name: EOM
Refers to: =EOMONTH(NOW(),0)

=EOM

Excel will accept that as a validation formula without complaining but the
validation does not work.

Excel will accept that as a conditional format formula without complaining
and the formatting will work.
 
R

Rick Rothstein \(MVP - VB\)

I'm guessing another possibility, instead of specifying a Between set of
conditions, would be to use Custom and set the formula to this...

=MONTH(A1)=MONTH(TODAY())

(using the appropriate cell reference, of course) thus avoiding this issue
altogether.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top