Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count Highlighted Rows
How do I count the number of highlighted rows?
Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
count colored rows | Excel Discussion (Misc queries) | |||
Function to Count Number of Consecutive Rows with a Specific Criteria? | Excel Worksheet Functions | |||
Display count of rows | Excel Worksheet Functions | |||
Insert rows | Excel Worksheet Functions | |||
Count highlighted cells | Excel Worksheet Functions |