I have a large list of around 6000 items each with a consecutive item reference number . I require a macro as follows to create a new item ref number as a formula.
-Put cursor in new cell eg C5000 . (D5000 contains item name)
-Macro takes the item number above eg 3000 from cell eg C4900 and adds "1" in formula form ie the new cell C5000 becomes (=1+C 4900)
-The new cell then has a new value of say 3001
-The number of rows above the item ref vary but are always blanks.
I have come up with the following but unfortunately
the new item number loses the formula. ie becomes (=3001) and I require =1+C4900
ActiveCell.Formula = "= 1+" & Selection.End(xlUp)
Any help would be appreciated to perfect my first macro
Edited by Robert Dunn, 28 August 2005 - 03:08 AM.