How do I find out how many rows I have selected?

G

Guest

If I select a group of rows, and then add more groups of rows to the
selection by holding down CTRL, How can I find out the total number of rows
selected?

Is there a way of identifying how many items have been selected without
counting them yourself?

Thanks!
 
M

MartinW

Hi ABR,

Right click on the status bar and select Count.
Then select your cells and look at the right side of the status bar.

The status bar is at the bottom of your screen and usually says Ready
on the left side and has 6 or 7 boxes on the right side which may or
may not be empty depending on your settings.

HTH
Martin
 
J

JW

Keep in mind that Martin's suggestion will count the number of cells
that contain data within the selected rows. It will not just count
the number of selected rows. If it is truly the number of selected
rows that you are after, you'll need to use VBA.
 
G

Guest

In the immediate window i entered:

? Selection.count/256 (256 for Excel 2003 and Prior)

Got me the right answer

Jim May
 
J

JW

Jim, that is what I was getting ready to suggest as well.
Sub likeThis()
MsgBox = Selection.Count / 256
End Sub
 
D

Dave Peterson

If you're looking for a VBA solution to count the number of rows selected:

Option Explicit
Sub testme02()
MsgBox Intersect(Selection.EntireRow, ActiveSheet.Columns(1)).Cells.Count
End Sub

I'm not sure what an item is in your description.
 

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