View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
zigstick zigstick is offline
external usenet poster
 
Posts: 1
Default Macro Copy Active Cell to Range Name, loop

Hi, I need to create a macro to run the following sequence:

1. Copy the Active Cell (say it's A1, "mark")
2. Move up to the Name Box at top left corner to name the cell range
(Is this correct for that location? -- ActiveWorkbook.Names.Add
Name:="servera", RefersToR1C1:="=Sheet1!R1C1"
3. Paste what was copied from the active cell and Enter, to name the
cell range.
4. Move to another cell, say A3 ("david) and restart the process,
copying the active cell (which will hold a different name)

Please use example below:
A B C D E
1 mark
2 john
3 david
4 larry
5 michael

Thanks!!!!