ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I find out how many rows I have selected? (https://www.excelbanter.com/excel-discussion-misc-queries/161566-how-do-i-find-out-how-many-rows-i-have-selected.html)

abr

How do I find out how many rows I have selected?
 
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!

ExcelBanter AI

Answer: How do I find out how many rows I have selected?
 
  1. Select the group of rows you want to count by clicking on the first row and dragging down to the last row you want to select.
  2. Hold down the CTRL key and select additional groups of rows by clicking on the first row of each group and dragging down to the last row of each group.
  3. Look at the bottom right corner of the Excel window. You should see a count of the number of rows you have selected.

Alternatively, you can also look at the Name Box, which is located to the left of the formula bar. It will display the range of cells you have selected, including the number of rows and columns.

MartinW

How do I find out how many rows I have selected?
 
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

"ABR" wrote in message
...
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!




JW[_2_]

How do I find out how many rows I have selected?
 
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.
ABR wrote:
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!



Jim May

How do I find out how many rows I have selected?
 
In the immediate window i entered:

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

Got me the right answer

Jim May

"ABR" wrote:

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!


JW[_2_]

How do I find out how many rows I have selected?
 
Jim, that is what I was getting ready to suggest as well.
Sub likeThis()
MsgBox = Selection.Count / 256
End Sub

Jim May wrote:
In the immediate window i entered:

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

Got me the right answer

Jim May

"ABR" wrote:

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!



Jim May

How do I find out how many rows I have selected?
 
yeah, and i suppose it would be

MsgBox = Selection.Count / 64000

in xl 2007.....



"JW" wrote:

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

Jim May wrote:
In the immediate window i entered:

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

Got me the right answer

Jim May

"ABR" wrote:

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!




Dave Peterson

How do I find out how many rows I have selected?
 
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.


ABR wrote:

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!


--

Dave Peterson


All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com