Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Sum or Count?


I have a single column that contains multiple entries of 7 different ratings:
P, PG, PG13, R, NC17, X, Unrated. I'm trying to initialize a Summary
userform with the sum of each of these and assign these sums to a label for
each of the ratings. I thought about Sum or Count but I can't figure out the
best way to extract all the entries for each rating, get a total and assign
it to a variable. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Sum or Count?


If you want to use a formula:

="P = " & COUNTIF(A3:A15, "P")

I used rang A3:A15, but you can use whatever range the criteria is in.
CountIf
concatenated to each rating, i.e. "PG = ", PG13 = ", etc. will give you an
output
like P = 5, PG = 11, etc. You need a formula for each rating code in their
individual cells.


"Bishop" wrote in message
...
I have a single column that contains multiple entries of 7 different
ratings:
P, PG, PG13, R, NC17, X, Unrated. I'm trying to initialize a Summary
userform with the sum of each of these and assign these sums to a label
for
each of the ratings. I thought about Sum or Count but I can't figure out
the
best way to extract all the entries for each rating, get a total and
assign
it to a variable. Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Sum or Count?

A Pivot table does this in no time. But you need it in code onto a userform?
If your entries are strictly limited and at all times properly spelled <g,
this might be a start:

Sub test()
MsgBox Application.WorksheetFunction.CountIf(Sheets(1).Ra nge("A1:A1000"),
"PG13")
End Sub

COUNTIF is the proper spreadsheet formula here if I understand you correct.

HTH. Best wishes Harald


"Bishop" wrote in message
...
I have a single column that contains multiple entries of 7 different
ratings:
P, PG, PG13, R, NC17, X, Unrated. I'm trying to initialize a Summary
userform with the sum of each of these and assign these sums to a label
for
each of the ratings. I thought about Sum or Count but I can't figure out
the
best way to extract all the entries for each rating, get a total and
assign
it to a variable. Any ideas?



-----------------------------------------------------------------------------
Our Peering Groups change
Visit : http://spacesst.com/peerin
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 806
Default Sum or Count?

Hello,

I suggest to use mz UDF Pstat:
http://www.sulprobil.com/html/pstat.html

Regards,
Bernd
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
Count Employee Work Time - Don't Count Duplicates J Excel Worksheet Functions 3 May 1st 07 10:47 PM
Count Employee Work Time - Don't Double-count Overlapping Apts. J Excel Worksheet Functions 0 April 27th 07 05:52 AM
Excel 2000, count, sort a list & count totals? sunslight Excel Worksheet Functions 1 April 9th 07 05:46 PM
Excel Count characters in a textbox to display character count? [email protected] Excel Programming 1 February 8th 07 06:31 AM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM


All times are GMT +1. The time now is 01:08 AM.

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"