Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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
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
Recurring header. Col Phil Excel Worksheet Functions 1 March 19th 10 07:01 PM
counting recurring #'s in a column okie7392 Excel Worksheet Functions 2 November 18th 07 06:29 PM
How to build effective IF Statement for recurring value in cells....sensitivity analysis [email protected] Excel Discussion (Misc queries) 1 March 30th 07 09:14 PM
Recurring pattern LaDdIe Excel Worksheet Functions 2 March 9th 07 09:25 PM
Recurring problem - user input date from messagebox doesn't get formatted correctly in secondary cells. StargateFan[_3_] Excel Programming 3 March 25th 06 04:21 PM


All times are GMT +1. The time now is 11:42 PM.

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"