If month in date A1 is January put day of A1 in B1


Posted by Phil on December 06, 2001 9:40 PM

Seemed simple, but I am an amateur and for some reason can't seem to find the answer.
I have a column of dates and want to have another 12 columns, one column for each month. If the date in one cell of my column of dates is in January, I want to put the day of January into the same row but in January column.

Posted by Colo on December 06, 2001 11:01 PM

Hi Phil.

This is sheet image.(Row1 is a title)
---------------------------------------------------------
A B C D E F G H I J K L M
---------------------------------------------------------
1 date Jan Feb Mar Apr May Jun July Aug Sep Oct Nov Dec
2 8-Jan 8
3 3-Feb 3
4 5-Apr 5
5 2-Dec 2
----------------------------------------------------------

If my image is right, please put formula like this.

[B2] =IF(MONTH($A2)=1,DAY($A2),"")
[C2] =IF(MONTH($A2)=2,DAY($A2),"")
[D2] =IF(MONTH($A2)=3,DAY($A2),"")
[E2] =IF(MONTH($A2)=4,DAY($A2),"")
/In the same way, please give the formula after this.
[M2]=IF(MONTH($A2)=12,DAY($A2),"")

And if you finished , please copy range("B2:M2") to below.

*I wish my table image will be shown on this site correctly.

If you want to move it by vba, then please repost.

Posted by Colo on December 06, 2001 11:05 PM

:*I wish my table image will be shown on this site correctly.
Sorry....
The table image I wrote was not displayed well, because "space" was deleted by cgi.



Posted by Phil on December 07, 2001 7:01 AM

Thanks!!!