PC Review


Reply
Thread Tools Rate Thread

Counting recurring cells

 
 
Peter
Guest
Posts: n/a
 
      27th Dec 2006
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

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      27th Dec 2006

Have a look in the help index for COUNTIF
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Peter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      27th Dec 2006
=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
 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      27th Dec 2006
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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Dec 2006

application.countif(range("
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Peter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Dec 2006
or
for each c in range("a2:a22")
if ucase(c)="TOTAL" then mc=mc+1
next
msgbox mc

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Peter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
 
Peter
Guest
Posts: n/a
 
      27th Dec 2006
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
> (E-Mail Removed)
> "Peter" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Dec 2006
If you like it?

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Peter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>> (E-Mail Removed)
>> "Peter" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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 With Quote
 
Peter
Guest
Posts: n/a
 
      27th Dec 2006
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" <dguille...@austin.rr.com> wrote:
> If you like it?
>
> --
> Don Guillett
> SalesAid Software
> dguille...@austin.rr.com"Peter" <peter.a.r...@googlemail.com> wrote in messagenews:(E-Mail Removed)...
>
>
>
> > 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
> >> dguille...@austin.rr.com
> >> "Peter" <peter.a.r...@googlemail.com> wrote in message
> >>news:(E-Mail Removed)...
> >> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
counting highlighted cells or font color cells Tired Dan Microsoft Excel Discussion 0 10th Dec 2007 10:50 PM
counting recurring #'s in a column =?Utf-8?B?b2tpZTczOTI=?= Microsoft Excel Worksheet Functions 2 18th Nov 2007 06:29 PM
Complicated counting of cells (based on other cells contents) =?Utf-8?B?R2Vvcmdl?= Microsoft Excel Worksheet Functions 3 7th Nov 2005 06:39 PM
counting specific figures in cells dependant upon contents of adjacent cells judoist Microsoft Excel Discussion 2 15th Jun 2004 02:45 PM
Counting Number of Cells Including Merged Cells Daniel D. Microsoft Excel Worksheet Functions 12 24th Feb 2004 01:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 PM.