PC Review


Reply
Thread Tools Rate Thread

Activecell Count

 
 
Corey
Guest
Posts: n/a
 
      10th Sep 2008

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.



--
Corey ....
The Silliest Question is generally
the one i forgot to ask.
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      10th Sep 2008
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 Removed)
"Corey" <(E-Mail Removed)> wrote in message
news:(E-Mail 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.



--
Corey ....
The Silliest Question is generally
the one i forgot to ask.

 
Reply With Quote
 
John_John
Guest
Posts: n/a
 
      11th Sep 2008
You can also use the "Selection" object as above:

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

John

Ο χρήστης "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.
>
>
>
> --
> Corey ....
> The Silliest Question is generally
> the one i forgot to ask

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
count duplicats, display incremental count, restart count at changein value JenIT Microsoft Excel Programming 2 24th Aug 2010 09:10 PM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Microsoft Excel Misc 1 2nd Oct 2007 08:05 PM
How to Revert to ActiveCell.Formula = format from ActiveCell.FormulaR1C1 = format Karthik Bhat - Bangalore Microsoft Excel Programming 1 9th May 2007 02:37 PM
how to get count(col1), count(col2), count(sol3) with only one query Mario Krsnic Microsoft Access Queries 2 27th Oct 2006 06:52 PM
use of activecell inquirer Microsoft Excel Programming 8 16th May 2004 06:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:55 PM.