cameronfraser
Programmer
In EXCEL VBA I have a named range and I want to activate the last cell in the range.
Example:
the EXCEL named range "Dog" is "B6:B25" I want to activate the last cell in the range, "B25". I know Range("B25" will select the cell, but when rows are inserted above "Dog" then Range("B25" will not select the last cell of the range.
I tried the command:
Range("Dog".SpecialCells(xlCellTypeLastCell).Activate
Thid Does not work because this selects the last cell in the used range, not the specified range.
Is there a simple way to find the last cell in the range?
Example:
the EXCEL named range "Dog" is "B6:B25" I want to activate the last cell in the range, "B25". I know Range("B25" will select the cell, but when rows are inserted above "Dog" then Range("B25" will not select the last cell of the range.
I tried the command:
Range("Dog".SpecialCells(xlCellTypeLastCell).Activate
Thid Does not work because this selects the last cell in the used range, not the specified range.
Is there a simple way to find the last cell in the range?