Hi
I have a tab where I'd like to refer to the cells using named ranges instead of absolute references.
So, for example, I currently use this to select cell I8 then clear it, but
But I'd like to use this instead (assuming that the range for that cell is simply called 'First_Cell') I'd prefer to use a named range in case someone inserts a column, which would mean that the code would then delete the data in the wrong cell.
However, this code didn't work, as expected. Does anyone know the easiest way to modify this? TIA
I have a tab where I'd like to refer to the cells using named ranges instead of absolute references.
So, for example, I currently use this to select cell I8 then clear it, but
VBA Code:
'clear cell I8
'Range("I8").Select
Selection.ClearContents
But I'd like to use this instead (assuming that the range for that cell is simply called 'First_Cell') I'd prefer to use a named range in case someone inserts a column, which would mean that the code would then delete the data in the wrong cell.
However, this code didn't work, as expected. Does anyone know the easiest way to modify this? TIA
VBA Code:
'clear cell I8
Range.First_Cell.Select
Selection.ClearContents