i am wondering if its possible in vba code for references to stay the same even if i insert rows/columns in the workbook.
for example
in cell b4 ive typed "david". if i insert a bunch of columns in column A moving the "david" to say column F, i would like the vba to follow that cell so the "hello" range still refers to whatever cell the text "david" is in.
how do i do this in vba? thanks in advance.
for example
Code:
Sub movingselect()
Dim hello As Range
Set hello = Range("$b$4")
hello.Select
End Sub
in cell b4 ive typed "david". if i insert a bunch of columns in column A moving the "david" to say column F, i would like the vba to follow that cell so the "hello" range still refers to whatever cell the text "david" is in.
how do i do this in vba? thanks in advance.