Find the beginning Cell of a Range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a user input a range, how can I store the beginning cell of that range
in a variable?
 
Dim myRng as range
dim myCell as range

'somewhat the user defines myRng

set mycell = myrng.cells(1)
 
In a one area range:

Dim myRng as range
dim myCell as range

'somewhat the user defines myRng

with myrng
set mycell = .cells(.cells.count)
end with

with a multi-area range

with myrng
with .areas(.areas.count)
set mycell = .cells(.cells.count)
end with
end with
 

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

Back
Top