View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rocky McKinley Rocky McKinley is offline
external usenet poster
 
Posts: 102
Default bottom right cell on screen

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


--
Regards,
Rocky McKinley


"Stuart" wrote in message
...
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



Rocky McKinley wrote in message
...
'This will return the address of the visible cell in the bottom right

hand
corner of the screen.
MsgBox


Range(ActiveWindow.VisibleRange.Address)(ActiveWin dow.VisibleRange.Count).Ad
dress

'or to select it ...


Range(ActiveWindow.VisibleRange.Address)(ActiveWin dow.VisibleRange.Count).se
lect

--
Regards,
Rocky McKinley


"Stuart" wrote in message
...
How can I get the bottom right cell that can be seen on the screen?