bottom right cell on screen

  • Thread starter Thread starter Stuart
  • Start date Start date
'This will return the address of the visible cell in the bottom right hand
corner of the screen.
MsgBox
Range(ActiveWindow.VisibleRange.Address)(ActiveWindow.VisibleRange.Count).Ad
dress

'or to select it ...
Range(ActiveWindow.VisibleRange.Address)(ActiveWindow.VisibleRange.Count).se
lect
 
It can have benifits in certain instances, "Step 2" for instance visits
every second cell in a range.

For t = 1 To Selection.Count Step 2
temp = Range(Selection.Address)(t).Value
Next t
 
Many thanks for that, I have never come across that bit of syntax before

Range(address)(cells in)

Therefor presumably the following could be used to step through a selected
range!

For t = 1 To Selection.Count
temp = Range(Selection.Address)(t).Value
Next t


I don't know if it would have any benifit over my usual

for each rng in selection
temp = rng.value
next rng

But interesting never the less
 
Back
Top