MrExcel Publishing
Your One Stop for Excel Tips & Solutions

the MONTH() function -- doing more than it should...


Posted by Tony White on December 14, 2001 9:40 AM

I am keeping track of a list of items, and in the first cell of each row, I enter a date.

Because I want to track information by month, I have set column E to be MONTH(column A). The idea being that column E would have a month value only, so I would just track column e for my reports.

It looks to work well, except that for my blank rows for which I have yet to enter any information, column E is reporting a value of 1 as if it were reporting a month of January. Is there a way to prevent column E for calculating the month of a value in column A when I have yet to enter ANY information for those later rows? (For instance, I have entered records for rows 1 through 10, but column E continues to present the MONTH() for rows 11, 12, 13, and so on.)

Thanks!

Tony


Posted by Aladin Akyurek on December 14, 2001 9:49 AM


Tony --

It's

=IF(A1,MONTH(A1),"")

where A1 houses a date if any.

Aladin

===========

Posted by Tony White on December 14, 2001 11:51 AM

It works! Thanks!

Thank you Aladin, and to the message board for being here as well.

Tony