Search : in
By :

Copy formula until blank cell VBA

Last answer on Sep 3, 2009 8:13:50 am BST simsal, on Aug 31, 2009 11:12:41 am BST 
 Report this message to moderators

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

Configuration: Windows XP
Firefox 3.5.2

Best answers for « Copy formula until blank cell VBA » in :
[VBA] Deleting a word in a range of cell Show[VBA] Deleting a word in a range of cell In the case you want to delete a word in a sentence, just create a small macro that removes the word. But it will become difficult when you have word like, for example, "Theword" or "THEWORD" or...
VBA A simple second Timer ShowVBA A simple second Timer In VBA, there is Timer feature available,but you can create one very easily. In a module sheet: Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'For example: Start / Stop the timer every...
[VBA] Detecting changes in cell Show[VBA] Detecting changes in cell The Event Change feature of a sheet will detects the change in the active cell but it gives no information about the content. The example given below will help you to find out if the cell was changed,...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

 Excelguru, on Sep 3, 2009 8:13:50 am BST
  • +1

Check the Range().End(xldown) function A wise man once said, 'I complained that I had no shoes unti­l I met a man who had no feet.'
I am interested in financial Modelling and custom excel deve­lopment with excel macros.

Reply to Excelguru