Script for Dropping in a Month in Excel 2003

mkrawls

New Member
Joined
May 8, 2012
Messages
4
I am working on a large spreadsheet for my company and I have come up with a very complicated formula that looks at two columns of data and then counts if both criteria are met. However, the department I am doing this spreadsheet for wants it as automatically generated as possible and one of the columns needs to have only the month in it for the formula to work.

What I need is a script that will look at a date in one cell and then drop the month of that date into another cell. Any help you can give me would be appreciated!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to the board..

You can do it with a Formula..

If you want the TEXT of the month (January, February, etc)
=TEXT(A1,"mmmm")

If you want the NUMBER of the month (Jan=1, Jan=2, etc)
=MONTH(A1)


Hope that helps.
 
Upvote 0
That works, but it also poses a new problem. Anytime there's a blank field for the date it automatically puts the date in as January. Since this is a live spreadsheet with data being entered in hourly my tracking data would always be skewed for the month of January. Any suggestions?
 
Upvote 0
Assuming you want a blank returned by the formula when the referenced cell is blank..

Try

=IF(A1,TEXT(A1,"mmmm"),"")
and/or
=IF(A1,MONTH(A1),"")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top