Thread: Check month
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Check month

Filename is an argument to the Cell worksheet function telling it to return
the fully qualified path and filename of the workbook (and the sheet name).
However, it returns nothing unless the workbook has been saved once (so it
has a fully qualified path and filename).

--
Regards,
Tom Ogilvy


"jimmy" wrote in message ...
Sorry, what is "filename" for?
I tried to copy & paste your formula to E1 but doesn't, how to test?
Thanks..
"Bob Phillips"
.gbl...
You could create data validation for the column, let's say column E for
this example, with a custom type and a formula of

=MONTH(E1)=MONTH(DATEVALUE("01-"&MID(CELL("Filename",A1),FIND("]",CELL("filename",A1))+1,99)&"-"&YEAR(TODAY())))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"jimmy" wrote in message
...
Hi all,

How to set the entry in a specific column must in date type and checking
for this date must in a specific month? e.g. in the sheet name "Feb",
all the date in column in "A" other than February will not be accepted
and prompt a dialog box to ask the user to use another sheet..

Thanks