Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Date checking code
How would I change
this condidtion to check for a value whe PLEXP is = Date and the Month of PLEXP is <= Next Month Also taking into consideration a Dec/Jan value combination. (PLEXP Month is Dec) If ((DateValue(PLEXP) = Date) And _ (DatePart("M", DateValue(PLEXP)) <= _ (DatePart("M", Date) + DatePart("M", Date) + 1))) Then I can't quite get it right. Not used to VBA. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Date checking code
If ((DateValue(PLEXP) = Date) And _
(DateValue(PLEXP) <= _ DateSerial(year(Date),Month(Date)+2,0)) Then I think you would run into problems at for the Dec Jan time frame if you just check on Month, so This checks if the PLEXP is <= the last day of the next month. I believe that will achieve your ends. -- Regards, Tom Ogilvy "Mr. Clean" wrote in message om... How would I change this condidtion to check for a value whe PLEXP is = Date and the Month of PLEXP is <= Next Month Also taking into consideration a Dec/Jan value combination. (PLEXP Month is Dec) If ((DateValue(PLEXP) = Date) And _ (DatePart("M", DateValue(PLEXP)) <= _ (DatePart("M", Date) + DatePart("M", Date) + 1))) Then I can't quite get it right. Not used to VBA. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Date checking code
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
evnet code, checking for entry | Excel Worksheet Functions | |||
Checking and Unchecking CheckBoxes in code | Excel Discussion (Misc queries) | |||
Color Code Date Checking | Excel Worksheet Functions | |||
Checking with code to see if a Workbook is Protected? | Excel Programming | |||
Checking for existence of macros or code in an Excel Spreadsheet | Excel Programming |