Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Last day of month is saturday or sunday?
Hi! I have a macro that loops through a series of dates and perfoms
calculations for these dates. I skip saturdays and sundays. However if the last day of any month is saturday or sunday then i want to perform a calculation. How can I check if a date is the last day of a month? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Last day of month is saturday or sunday?
Try testing your date this way...
If YourDate = DateSerial(Year(YourDate), Month(YourDate) + 1, 0) Then ' YourDate is the last day of the month End If Rick "Arne Hegefors" wrote in message ... Hi! I have a macro that loops through a series of dates and perfoms calculations for these dates. I skip saturdays and sundays. However if the last day of any month is saturday or sunday then i want to perform a calculation. How can I check if a date is the last day of a month? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Last day of month is saturday or sunday?
If Month(test_Date) < Month(test_Date + 1) Then
'last day of month -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Arne Hegefors" wrote in message ... Hi! I have a macro that loops through a series of dates and perfoms calculations for these dates. I skip saturdays and sundays. However if the last day of any month is saturday or sunday then i want to perform a calculation. How can I check if a date is the last day of a month? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional formatting of Saturday/Sunday in calendar | Excel Discussion (Misc queries) | |||
Friday as weekend instead of Saturday & Sunday | Excel Worksheet Functions | |||
I want to set weekly off as Thursday instead of Saturday & Sunday | Excel Worksheet Functions | |||
NETWORKDAYS including Saturday and Sunday | Excel Discussion (Misc queries) | |||
Is there a way to identify saturday and sunday automatically | Excel Discussion (Misc queries) |