Activecell Count

  • Thread starter Thread starter Corey
  • Start date Start date
C

Corey

Is there a way to have a cell(Say L59) display how many cells are selected.
I am using the Ctrl + Mouse to select multiply cells, but want to know how many cells are in total slected.

I tried:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("L59").Value = ActiveCell.Count
End Sub

But it only seem to show - 1 and nevr changes when more than 1 cell is selected.
 
Pls post in plain text and top post

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Target.Cells.Count
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)

Is there a way to have a cell(Say L59) display how many cells are selected.
I am using the Ctrl + Mouse to select multiply cells, but want to know how
many cells are in total slected.

I tried:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("L59").Value = ActiveCell.Count
End Sub

But it only seem to show - 1 and nevr changes when more than 1 cell is
selected.
 
You can also use the "Selection" object as above:

Range("L59").Value = Selection.Cells.Count

John

Ο χÏήστης "Corey" έγγÏαψε:
 

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

Back
Top