Is there a way for the code to be auto updated much like a formula does when inserting rows and columns?
Is there a way for the code to be auto updated much like a formula does when inserting rows and columns?
Short story: no.
Long story: create (Dynamic) Named Ranges for the cells and ranges that you need to refer to and then use those (D)NRs rather than hard coding references like Range("B1").Value; use, for example, Range("nrCompany")
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Good tip!
And if a NR is say, A1:B10 and you need to paste to B1 you use an Offset?
Well, basically, you need to be able to NOT refer to a hard coded range if that range is likely to change/be moved.
Thanks for the rep.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks