Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Count Highlighted Rows

How do I count the number of highlighted rows?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default Count Highlighted Rows

Hi,

take a look at
http://www.cpearson.com/excel/SortByColor.htm

or if you just want to know how many numbers are in selected rows, right
click below the sheets guide and chose count

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Anonymous" escreveu:

How do I count the number of highlighted rows?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Count Highlighted Rows

If you want the count displayed in a cell as result, you can use the
following custom function:

Function CountEm() As Long

Dim lngRows As Long

lngRows = Selection.Rows.Count

CountEm = lngRows

End Function

--
Kevin Backmann


"Marcelo" wrote:

Hi,

take a look at
http://www.cpearson.com/excel/SortByColor.htm

or if you just want to know how many numbers are in selected rows, right
click below the sheets guide and chose count

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Anonymous" escreveu:

How do I count the number of highlighted rows?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Count Highlighted Rows

I created the function. However, when I put =countem() in a cell I get the
following error:

#NAME?

"Kevin B" wrote:

If you want the count displayed in a cell as result, you can use the
following custom function:

Function CountEm() As Long

Dim lngRows As Long

lngRows = Selection.Rows.Count

CountEm = lngRows

End Function

--
Kevin Backmann


"Marcelo" wrote:

Hi,

take a look at
http://www.cpearson.com/excel/SortByColor.htm

or if you just want to know how many numbers are in selected rows, right
click below the sheets guide and chose count

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Anonymous" escreveu:

How do I count the number of highlighted rows?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Count Highlighted Rows

If you put the function in a worksheet module you will get the #Name error.

Press Alt+F11 to open the VBE and insert a new module by clicking INSERT in
the menu and selecting MODULE. Double click on the Sheet# icon under the
Microsoft Excel Objects folder in the VBA Project Explorer window, cut the
formula and paste it into the new module.

Add the following line under the Dim statement:

Application.Volatile

This will force the formula to recalc whenever the worksheet recalcs or you
press F9

--
Kevin Backmann


"Anonymous" wrote:

I created the function. However, when I put =countem() in a cell I get the
following error:

#NAME?

"Kevin B" wrote:

If you want the count displayed in a cell as result, you can use the
following custom function:

Function CountEm() As Long

Dim lngRows As Long

lngRows = Selection.Rows.Count

CountEm = lngRows

End Function

--
Kevin Backmann


"Marcelo" wrote:

Hi,

take a look at
http://www.cpearson.com/excel/SortByColor.htm

or if you just want to know how many numbers are in selected rows, right
click below the sheets guide and chose count

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Anonymous" escreveu:

How do I count the number of highlighted rows?

Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
count colored rows NoviceLois Excel Discussion (Misc queries) 1 December 28th 05 11:52 PM
Function to Count Number of Consecutive Rows with a Specific Criteria? Templee1 Excel Worksheet Functions 2 July 10th 05 10:22 PM
Display count of rows Judy Ward Excel Worksheet Functions 2 June 23rd 05 07:23 AM
Insert rows Mr. G. Excel Worksheet Functions 3 March 31st 05 03:49 AM
Count highlighted cells Robbie in Houston Excel Worksheet Functions 2 February 16th 05 12:52 AM


All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"