Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
The problem is thus:
I am trying to count the volume of cells on a sheet with the value "total", but I don't know how to! Does anyone in googleland have any ideas? Thanks for your help, Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
Have a look in the help index for COUNTIF -- Don Guillett SalesAid Software "Peter" wrote in message ups.com... The problem is thus: I am trying to count the volume of cells on a sheet with the value "total", but I don't know how to! Does anyone in googleland have any ideas? Thanks for your help, Peter |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
=countif(a1:a100,"total")
or =countif(a1:a100,"*total*") Adjust your range to match what you need. Peter wrote: The problem is thus: I am trying to count the volume of cells on a sheet with the value "total", but I don't know how to! Does anyone in googleland have any ideas? Thanks for your help, Peter -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
Thanks for the reply but countif does not seem to work in VBA. Sorry
for not being clear in my question but I am writing a macro in VBA. If you can do it in Excel I'm sure you can do it in VBA. Thanks, Peter |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
application.countif(range(" -- Don Guillett SalesAid Software "Peter" wrote in message ups.com... Thanks for the reply but countif does not seem to work in VBA. Sorry for not being clear in my question but I am writing a macro in VBA. If you can do it in Excel I'm sure you can do it in VBA. Thanks, Peter |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
or
for each c in range("a2:a22") if ucase(c)="TOTAL" then mc=mc+1 next msgbox mc -- Don Guillett SalesAid Software "Peter" wrote in message ups.com... Thanks for the reply but countif does not seem to work in VBA. Sorry for not being clear in my question but I am writing a macro in VBA. If you can do it in Excel I'm sure you can do it in VBA. Thanks, Peter |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
Thanks,
This is what I did in the end: Cells(1, 4) = "=COUNTIF(R[0]C[-1]:R[" & c & "]C[-1],""Total"")" m = Cells(1, 4).Value Cells(1, 4).Select Selection.Clear MsgBox m & " totals" Peter Don Guillett wrote: or for each c in range("a2:a22") if ucase(c)="TOTAL" then mc=mc+1 next msgbox mc -- Don Guillett SalesAid Software "Peter" wrote in message ups.com... Thanks for the reply but countif does not seem to work in VBA. Sorry for not being clear in my question but I am writing a macro in VBA. If you can do it in Excel I'm sure you can do it in VBA. Thanks, Peter |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting recurring cells
To be honest I prefered your way, it was just while I was waiting I
worked out the above. Thanks for the help, Peter On Dec 27, 5:34 pm, "Don Guillett" wrote: If you like it? -- Don Guillett SalesAid Software "Peter" wrote in oglegroups.com... Thanks, This is what I did in the end: Cells(1, 4) = "=COUNTIF(R[0]C[-1]:R[" & c & "]C[-1],""Total"")" m = Cells(1, 4).Value Cells(1, 4).Select Selection.Clear MsgBox m & " totals" Peter Don Guillett wrote: or for each c in range("a2:a22") if ucase(c)="TOTAL" then mc=mc+1 next msgbox mc -- Don Guillett SalesAid Software "Peter" wrote in message roups.com... Thanks for the reply but countif does not seem to work in VBA. Sorry for not being clear in my question but I am writing a macro in VBA. If you can do it in Excel I'm sure you can do it in VBA. Thanks, Peter- Hide quoted text -- Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Recurring header. | Excel Worksheet Functions | |||
counting recurring #'s in a column | Excel Worksheet Functions | |||
How to build effective IF Statement for recurring value in cells....sensitivity analysis | Excel Discussion (Misc queries) | |||
Recurring pattern | Excel Worksheet Functions | |||
Recurring problem - user input date from messagebox doesn't get formatted correctly in secondary cells. | Excel Programming |