First row in Selection range (first index of a cell)

M

Marcin

Hello,
I have a problem with selecting first cel in selection Range or return
an index of the first cell in Selection Cell.

I have something like this:
....................
Range1.Select
"and here I want to Select the first range in selection Range1"
.............
I there any special function of finding first cell in selection range
or returning an index of the first cell??
Thanks for answet
Marcin
 
T

Tony Jollans

The first cell in the selection can be got with ...

selection.cells(1)

or

selection.range.cells(1)

Its row and/or column nuber can be got with the RowIndex and/or ColumnIndex
properties

BUT beware that, depending on the selection, the cells in Selection and
those in Selection.Range may not be the same (although the first - and
last - ones will be)
 
M

Marcin

Thanks for answer,
Could You tell me how will the statement with RowIndex look like?
selection.cells(1).RowIndex?
 

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