Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Iamwhoiam
 
Posts: n/a
Default countif multiple criteria

This is tough one, one of my culumns..

O_ACCOUNTCODE
EUSMD386
EUSMD458
EUSMD303
DEP06111
EUSMD303
WILLIAMS02
EUSMD386
BG001
EUSMD386
BBEN01
DEP06111
DEPTM021
DEPTM021
DEP06111
BOSBOU01
DEPMOD001
DEP06111
SIHILE
EUSMD516
EUSMD516
EUSMD523
ALB001
SARADEP SOC01
AGATHA
AGATHA
EUSMD110
EUSMD651
OBC01
EUSMD303
EUSMD651
EUSMD110
EUSMD659
WILLIAMS02
EUSMD386
SA LW001
EUSMD104

In this column as above, all of these acount belong in different categories,
such as
RETAIL SALE
CORP SALES
GOV SALES
CHANNEL SALES
Thereare 4000 entries and about 200 different accounts

The problem is that you can count by using countif:
example: =countif(d2:d2000,"EUSMD*")+countif(d2:d2000,"WILL IAM*")..etc
but my problem is there are about 50 diiferent accounts for each category.
What would be the easiest way to count the acounts that are in the retail
group, using a VBA function or something to that effect. I already know that
excel can't do this by itself, as there is a 255 char limit on the length of
the formula. also updating the formula is pretty painful.
Can anyone suggest anything here?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default countif multiple criteria

I'd put a lookup table on a separate worksheet (call it Sheet2 for arguments
sake) that lists each unique account in column A and the corresponding
category next to it in column B. Then, add a helper column next to your
400-entry list. If your list begins in d2, then in e2 enter the formula
=vlookup(e2,Sheet2!A:B,2,0). Copy that formula down through all relevant
rows.
Then base your countif on the categories listed in column E instead of the
accounts in column D.
My two cents. --Bruce

"Iamwhoiam" wrote:

This is tough one, one of my culumns..

O_ACCOUNTCODE
EUSMD386
EUSMD458
EUSMD303
DEP06111
EUSMD303
WILLIAMS02
EUSMD386
BG001
EUSMD386
BBEN01
DEP06111
DEPTM021
DEPTM021
DEP06111
BOSBOU01
DEPMOD001
DEP06111
SIHILE
EUSMD516
EUSMD516
EUSMD523
ALB001
SARADEP SOC01
AGATHA
AGATHA
EUSMD110
EUSMD651
OBC01
EUSMD303
EUSMD651
EUSMD110
EUSMD659
WILLIAMS02
EUSMD386
SA LW001
EUSMD104

In this column as above, all of these acount belong in different categories,
such as
RETAIL SALE
CORP SALES
GOV SALES
CHANNEL SALES
Thereare 4000 entries and about 200 different accounts

The problem is that you can count by using countif:
example: =countif(d2:d2000,"EUSMD*")+countif(d2:d2000,"WILL IAM*")..etc
but my problem is there are about 50 diiferent accounts for each category.
What would be the easiest way to count the acounts that are in the retail
group, using a VBA function or something to that effect. I already know that
excel can't do this by itself, as there is a 255 char limit on the length of
the formula. also updating the formula is pretty painful.
Can anyone suggest anything here?

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
Use multiple criteria with COUNTIF: between dates and not blank l.shields Excel Worksheet Functions 13 July 27th 09 06:53 PM
Counting cells using multiple criteria andrew.curley Excel Worksheet Functions 4 June 12th 06 04:41 PM
Multiple Criteria using countif calmo Excel Worksheet Functions 6 October 25th 05 08:33 PM
multiple criteria in one field 4a,4b etc of countif? Anne-Marie Excel Discussion (Misc queries) 1 October 20th 05 02:23 PM
Multiple CountIf Criteria JerryS Excel Worksheet Functions 1 October 14th 05 07:14 PM


All times are GMT +1. The time now is 03:23 PM.

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"