Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Help with Newbie question - Cell Reference
When writing a function in a cell, it always refers to that cell, regardless if it moves. (Rows and columns are inserted) When writing in VBA how do I make VBA track the cell's movement, so that when I insert rows and columns with VBA code it is still referring to the same cell? Here is what I am using: MyVAR = Cells(20, 6).Value 'If I insert rows and columns it still refers to cell 20,6 Thanks in advance for any help with this! |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Help with Newbie question - Cell Reference
You could name that cell (insert|name|define)
Then you could use: myVar = worksheets("sheet1").range("mynamehere").value wrote: When writing a function in a cell, it always refers to that cell, regardless if it moves. (Rows and columns are inserted) When writing in VBA how do I make VBA track the cell's movement, so that when I insert rows and columns with VBA code it is still referring to the same cell? Here is what I am using: MyVAR = Cells(20, 6).Value 'If I insert rows and columns it still refers to cell 20,6 Thanks in advance for any help with this! -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reference Cell Color From Other WorkSheets | Excel Worksheet Functions | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
Absolute cell reference question | Excel Worksheet Functions | |||
how do I format a cell reference to move as source changes | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions |