Copy formula until blank cell VBA

Closed
simsal - Aug 31, 2009 at 06:12 AM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Sep 3, 2009 at 03:13 AM
Hello,
I'm starting to learn how to use VBA (so bear with me!)

I have a column which has dates in it. The number of dates I enter into this column will vary so I need a macro that will go through this column, row by row until it reaches a blank cell (the last value).

When it finds a date in a cell it needs to insert the "=month" formula into the adjacent cell.

Example:

Column A Column B
27/10/2009 10
13/09/2009 09
30/07/2009 07

Macro ends.

Not sure if this is also possible but if it could enter the month name oppose to the month number that would be awesome. Seeing as I'm learning how to use VBA it would be really helpful if you could provide a few comments in the code so I know which bit does what :D

Thanks in advance,
Alex

1 response

Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 307
Sep 3, 2009 at 03:13 AM
check the Range().End(xldown) function
3