ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing range reference (https://www.excelbanter.com/excel-programming/295168-changing-range-reference.html)

Lawlera

changing range reference
 
I have several sheets reading the value from a single cell.
Trouble is that is a row or column is inserted all the referencing is thrown out the window
Naming the cell seems to be the answer but having difficulty with the syntax for reading the cell using
' reference:-"cellname"

Grateful for any ideas that don't include goto or select

TIA

Don Guillett[_4_]

changing range reference
 
Have you tried absolute references to lock it
$a$1 will stay as a1

--
Don Guillett
SalesAid Software

"Lawlera" wrote in message
...
I have several sheets reading the value from a single cell.
Trouble is that is a row or column is inserted all the referencing is

thrown out the window!
Naming the cell seems to be the answer but having difficulty with the

syntax for reading the cell using
' reference:-"cellname" '

Grateful for any ideas that don't include goto or select!

TIA




Tom Ogilvy

changing range reference
 
Range("A1").Value = Range("CellName").Value

If done in a sheet module and cellname is on another sheet you need to
include the sheet name

Range("A1").Value = Worksheets("SheetOther").Range("CellName").Value

for a formula

=CellName



--
Regards,
Tom Ogilvy

"Lawlera" wrote in message
...
I have several sheets reading the value from a single cell.
Trouble is that is a row or column is inserted all the referencing is

thrown out the window!
Naming the cell seems to be the answer but having difficulty with the

syntax for reading the cell using
' reference:-"cellname" '

Grateful for any ideas that don't include goto or select!

TIA




Lawlera

changing range reference
 
Thanks Tom - mind block - didn't guess it would be that simple!


All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com