Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I set up a counter cell?
I need to set up a cell that counts the number of rows I am using, and sets
that number in a cell. Is there a way to make sure to check to see if the row has a value in the first cell. I know i need to set up some type of if statement for this, but I'm not sure how to go about it. Can anyone help me? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I set up a counter cell?
Hi,
Right click the sheet tab, view code and paste this in. Change the cell address to whatever you want:- Private Sub Worksheet_Change(ByVal Target As Range) Range("A1").Value = ActiveSheet.UsedRange.Rows.Count End Sub Mike "Valpocandi" wrote: I need to set up a cell that counts the number of rows I am using, and sets that number in a cell. Is there a way to make sure to check to see if the row has a value in the first cell. I know i need to set up some type of if statement for this, but I'm not sure how to go about it. Can anyone help me? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I set up a counter cell?
What should be included in your row count? If the first row contains no
data, should that row be counted? Assuming that you want to omit the first row in your count only if it contains no data, then maybe something like this: =IF(COUNTA(1:1)=0,COUNTA(A:A)-1,COUNTA(A:A)) Keep in mind that this will count rows if column A of the row contains data. If column A contains no data, then it is assumed that the row is empty. HTH, Paul -- "Valpocandi" wrote in message ... I need to set up a cell that counts the number of rows I am using, and sets that number in a cell. Is there a way to make sure to check to see if the row has a value in the first cell. I know i need to set up some type of if statement for this, but I'm not sure how to go about it. Can anyone help me? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
dynamic character counter for merged cell text field | Excel Worksheet Functions | |||
1+2+3+4+........... Counter | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Cell counter | Excel Discussion (Misc queries) | |||
Counter | Excel Discussion (Misc queries) |