Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all experts, this is probably a very simple question but I am just stuck
here. A1 is a Date, how can I read from A1 and write a column in another worksheet of the date from first day to last day of the month and year of A1? Many thanks in advance! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=IF(MONTH($A$1)=MONTH(DATE(YEAR($A$1),
MONTH($A$1),ROW(A1))),DATE(YEAR($A$1),MONTH($A$1), ROW(A1)),"") Copy down to 31 rows -- Kind regards, Niek Otten "Toto Sanderson" <Toto wrote in message ... Hi all experts, this is probably a very simple question but I am just stuck here. A1 is a Date, how can I read from A1 and write a column in another worksheet of the date from first day to last day of the month and year of A1? Many thanks in advance! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your quick response. But it doesn't work on my case.
Say, m = Month(Worksheets("Sheet1").Cells(1, 1)) y = Year(Worksheets("Sheet1").Cells(1, 1)) in Sheet 2, how can I make the value of Cell B1 as the Date 01 to 30/31 of month m and year y? The following code doesn't work: Worksheets("Sheet2").Cells(1, 2) = DATE(y, m, 1) Please help again! Thanks! "Niek Otten" wrote: =IF(MONTH($A$1)=MONTH(DATE(YEAR($A$1), MONTH($A$1),ROW(A1))),DATE(YEAR($A$1),MONTH($A$1), ROW(A1)),"") Copy down to 31 rows -- Kind regards, Niek Otten "Toto Sanderson" <Toto wrote in message ... Hi all experts, this is probably a very simple question but I am just stuck here. A1 is a Date, how can I read from A1 and write a column in another worksheet of the date from first day to last day of the month and year of A1? Many thanks in advance! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
<The following code doesn't work:
Worksheets("Sheet2").Cells(1, 2) = DATE(y, m, 1) Use DateSerial instead -- Kind regards, Niek Otten "Toto Sanderson" wrote in message ... Thanks for your quick response. But it doesn't work on my case. Say, m = Month(Worksheets("Sheet1").Cells(1, 1)) y = Year(Worksheets("Sheet1").Cells(1, 1)) in Sheet 2, how can I make the value of Cell B1 as the Date 01 to 30/31 of month m and year y? The following code doesn't work: Worksheets("Sheet2").Cells(1, 2) = DATE(y, m, 1) Please help again! Thanks! "Niek Otten" wrote: =IF(MONTH($A$1)=MONTH(DATE(YEAR($A$1), MONTH($A$1),ROW(A1))),DATE(YEAR($A$1),MONTH($A$1), ROW(A1)),"") Copy down to 31 rows -- Kind regards, Niek Otten "Toto Sanderson" <Toto wrote in message ... Hi all experts, this is probably a very simple question but I am just stuck here. A1 is a Date, how can I read from A1 and write a column in another worksheet of the date from first day to last day of the month and year of A1? Many thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Unique Values in 1 Column based on Date Range in another Column | Excel Worksheet Functions | |||
Referencing date column A & time column B to get info from column | Excel Discussion (Misc queries) | |||
Need the formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date | Excel Discussion (Misc queries) | |||
Need Formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date | Excel Discussion (Misc queries) | |||
If data in one column, take date, add 2 days, and turn the entire column a color... | Excel Discussion (Misc queries) |