Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub Name_Range_for_Sandy() 'Name a range the value of the ActiveCell 'The range consists of two cells 'the cell to the Left 'and the cell above the cell to the left Range(ActiveCell.Offset(-1, -1), ActiveCell.Offset(0, -1)).Name _ = ActiveCell.Value End Sub Good Luck. "Sandy" wrote: Hello - I have to define the name for a long list of 2-cell ranges. I need a macro to do the following: I place the cell in the first cell, then the steps for the macro would be as follows: ( I am using these cells just for the example) 1 - start at B2 - copy the content of the cell (ctrl-C) 2 - Go to A2:A1 (move cursor 1 cell to the left and use SHIFT-UP ARROW to select both cells) 3 - Go to the Name Box (at the top left corner) and Paste the content from cell B2 4 - click ENTER to save the named range Any help would be appreciated. many thanks sandra |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro relative cell reference | Excel Worksheet Functions | |||
Using Relative Reference Function to apply to Range | Excel Programming | |||
Macro to capture cell value then use it for a relative range selec | Excel Programming | |||
How do I set up a macro using relative cell reference? | Excel Programming | |||
Start relative reference macro from specific cell | Excel Programming |