someone could help me with my first excel macro .
I have a list of items each with a consecutive item reference number .
2(cell c 2) cup
3 (c 3) glass
? (c 4) knife
I require a macro as follows for the reference of item "knife"
-Put cursor in cell c4
-Macro takes the item ref above ie 3 and adds 1 =4 in formula form ie =1+c3
-The reference then equals 4
-The rows between the item ref vary but are always blanks.
I have come up with the following but unfortunately
the item reference loses the formula. ie becomes =4 not =1+c3
ActiveCell.Formula = "= 1+" & Selection.End(xlUp)
Any help would be appreciated to perfect my first macro
Edited by Robert Dunn, 13 July 2005 - 01:54 AM.