how to search the upper and lower of a range

L

leungkong

I want to search the upper and lower row of a range.
for example,
Range("B3:E10")
Upper = "B"
Lower = "E"

Thanks.
 
Joined
Apr 29, 2008
Messages
66
Reaction score
0
Well B & E are the first and last *columns* of the range. In code you could use:
Upper = Range("MyRange").Column
Lower = Upper + Range("MyRange").Columns.Count - 1
and something similar would also work with rows.
HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top