getting the column and rows from a selection

G

Guest

I'm using the three lines below to select all of the cells in a worksheet
table that have data.

Range("E7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

This line gives me the row number of the last row in the selection, but I
can't figure out how to get the column number of the last column in the
selection.

cRows = Cells(Rows.Count, "A").End(xlUp).Row

Any ideas ? thanks.
 

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