Celeb Glow
general | February 27, 2026

How many rows did I select in Excel?

Is there an easy way to count the amount of rows I selected in a sheet?

I might be completely overlooking this but I don't see a counter or anything anywhere at all. The only counters I see is average, sum and cell count.

3

2 Answers

My approach is little different, and I would like to suggest you, a VBA Macro using Woksheet Selection Change Event to count selected Rows, which actually automates the Count.

Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim i As Long, lngAreas, lngRows As Long lngAreas = Selection.Areas.Count lngRows = 0 For i = 1 To lngAreas lngRows = lngRows + Selection.Areas(i).Rows.Count Next i MsgBox "There are " & lngRows & " rows selected"
End Sub

How it works:

  • Press ALT+F11 to open VB Editor.
  • Copy & Paste this Code & from File Menu click Close & Return to Microsoft Excel.
  • Save the WB as Macro enabled *.xlsm.
  • Select Cell/Rows, you get count through Message Box.

N.B.

This Macro will Count Row/Rows, as soon you select Row/Rows, using Mouse or Keyboard.

2

No. I don't think there would be anything built in.

However you can create a short macro and assign a hotkey to call it quickly:

Sub DisplayRowCount() MsgBox Selection.Rows.Count & " rows in the selection"
End Sub

enter image description here

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy