#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default count

i have a worksheet that categorize people into category n country. i need to
do a sum of all these ppl. is there a way to code a program to count the
number of name and insert it in certain cells.
  #2   Report Post  
Posted to microsoft.public.excel.programming
ADG ADG is offline
external usenet poster
 
Posts: 76
Default count

Hi Violet

Two options. Easiest option create a pivot table of your data, (use the
wizard if you are not familiar with pivot tables). The other option is to use
the sumif function, you will need to type each country into a cell for this.
--
Tony Green


"violet" wrote:

i have a worksheet that categorize people into category n country. i need to
do a sum of all these ppl. is there a way to code a program to count the
number of name and insert it in certain cells.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default count

You could also write a little table of the categories, and then create a
countif function for these. so, assuming the table is in A1:A10 on sheet2
and the data is on sheet 1, something like

Worksheets("Sheet2").Range("A1:A10").Formula = "=COUNTIF(Sheet1!A:A,A1)"


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"violet" wrote in message
...
i have a worksheet that categorize people into category n country. i need

to
do a sum of all these ppl. is there a way to code a program to count the
number of name and insert it in certain cells.



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 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
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM
Count Intervals of 1 Numeric value in a Row and Return Count down Column Sam via OfficeKB.com Excel Worksheet Functions 8 October 4th 05 04:37 PM
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 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"