Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
=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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |