|
-
Jun 15th, 2006, 04:10 AM
#1
[RESOLVED] Updating cells' references
This is a similar question to that I wrote in this thread but whereas I referred in it to a cell's contents, this now has to do with the cell's location.
If in a macro you have a line referencing to a cell, for example:
Cells(19, 5).Value = "100"
and then you insert a row above that cell, now the macro will place he value "100" in cell(20,5) instead. Is there an alternative way to write the macro so that you don't need to change the cell's col/row references in these cases? It's a pain in the neck and a source of errors when you have a large amount of references to manually update.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 15th, 2006, 06:37 AM
#2
Re: Updating cells' references
s there an alternative way to write the macro so that you don't need to change the cell's col/row references in these cases?
The best alternative is to used "Named ranges".
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Jun 15th, 2006, 10:44 AM
#3
Re: Updating cells' references
 Originally Posted by DKenny
The best alternative is to used "Named ranges".
I have no idea what these are, though the name sounds vaguely familiar. I've search with Google but despite a large number of hits they don't seem to bear a direct relationship with Excel. Could you please give me a hint?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 15th, 2006, 11:23 AM
#4
Re: Updating cells' references
Have a look at "Define named cell references or ranges" in the Excel Help File.
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Jun 15th, 2006, 11:27 AM
#5
Re: Updating cells' references
Now, wait a minute. I think I typed "namespaces" without a blank separation. I've just tried "named spaces" and found this which seems more like it. Is that what you meant?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 15th, 2006, 11:29 AM
#6
Re: Updating cells' references
 Originally Posted by DKenny
Have a look at "Define named cell references or ranges" in the Excel Help File.
I didn't notice you had already answered. Thanks.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 15th, 2006, 11:46 AM
#7
Re: Updating cells' references
 Originally Posted by DKenny
Have a look at "Define named cell references or ranges" in the Excel Help File.
Thanks a lot, I think this made my day no matter how simple it may be.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|