Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - number of monthdays ...
Hello!
I would like to change the follwoing command: dbentry = Day(DateSerial(Year(Date), Month(Date) + 1, 0)) * 24 Excel should take the number of days of the month "two days ago" (e.g. today is March 2nd, Excel should take number of days in February). My problem is that data from the previous month needs to be calculated on 1st and 2nd of the current month ... Can anybody help? Thank you, Mirja |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - number of monthdays ...
Hi Mirja,
Just leave out the "+1" -- Kind Regards, Niek Otten Microsoft MVP - Excel "Mirja" wrote in message ... Hello! I would like to change the follwoing command: dbentry = Day(DateSerial(Year(Date), Month(Date) + 1, 0)) * 24 Excel should take the number of days of the month "two days ago" (e.g. today is March 2nd, Excel should take number of days in February). My problem is that data from the previous month needs to be calculated on 1st and 2nd of the current month ... Can anybody help? Thank you, Mirja |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - number of monthdays ...
Hi Mirja
Day(DateSerial(Year(Date-2), Month(Date-2) + 1, 0)) You are not multiplying a date by 24 ? HTH. Best wishes Harald "Mirja" skrev i melding ... Hello! I would like to change the follwoing command: dbentry = Day(DateSerial(Year(Date), Month(Date) + 1, 0)) * 24 Excel should take the number of days of the month "two days ago" (e.g. today is March 2nd, Excel should take number of days in February). My problem is that data from the previous month needs to be calculated on 1st and 2nd of the current month ... Can anybody help? Thank you, Mirja |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
Find number of weekdays and wekend days given a total number of da | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |