Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Count only once with multiple columns

I have two columns:
A B
Cancelled ABC Company
Cancelled ABC Company
Active ABC Company
Cancelled ABC Company
Cancelled XYZ Company
Cancelled John Doe Company
Active The Smith Company

So I want to return this:
Cancelled 3
Active 2
Meaning that
there are 3 unique values counted once that are "Cancelled"
there are 2 unique values counted once that are "Active"

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Count only once with multiple columns

Try the following to get your Active Counts:

=COUNTIF(A2:A8,"Active")

Use this for your cancelled counts:

=COUNTIF(A2:A8,"Cancelled")

"jhicsupt" wrote:

I have two columns:
A B
Cancelled ABC Company
Cancelled ABC Company
Active ABC Company
Cancelled ABC Company
Cancelled XYZ Company
Cancelled John Doe Company
Active The Smith Company

So I want to return this:
Cancelled 3
Active 2
Meaning that
there are 3 unique values counted once that are "Cancelled"
there are 2 unique values counted once that are "Active"

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count only once with multiple columns

Data in the range A2:B8. Assuming no empty cells within the range.

E2 = Cancelled
E3 = Active

Enter this array formula** in F2 and copy down to F3:

=SUM(--(FREQUENCY(IF(A$2:A$8=E2,MATCH(B$2:B$8,B$2:B$8,0)) ,ROW(B$2:B$8)-ROW(B$2)+1)0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"jhicsupt" wrote in message
...
I have two columns:
A B
Cancelled ABC Company
Cancelled ABC Company
Active ABC Company
Cancelled ABC Company
Cancelled XYZ Company
Cancelled John Doe Company
Active The Smith Company

So I want to return this:
Cancelled 3
Active 2
Meaning that
there are 3 unique values counted once that are "Cancelled"
there are 2 unique values counted once that are "Active"

Thanks in advance



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Count only once with multiple columns

Thanks so much!!! This worked like a charm!

"T. Valko" wrote:

Data in the range A2:B8. Assuming no empty cells within the range.

E2 = Cancelled
E3 = Active

Enter this array formula** in F2 and copy down to F3:

=SUM(--(FREQUENCY(IF(A$2:A$8=E2,MATCH(B$2:B$8,B$2:B$8,0)) ,ROW(B$2:B$8)-ROW(B$2)+1)0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"jhicsupt" wrote in message
...
I have two columns:
A B
Cancelled ABC Company
Cancelled ABC Company
Active ABC Company
Cancelled ABC Company
Cancelled XYZ Company
Cancelled John Doe Company
Active The Smith Company

So I want to return this:
Cancelled 3
Active 2
Meaning that
there are 3 unique values counted once that are "Cancelled"
there are 2 unique values counted once that are "Active"

Thanks in advance




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count only once with multiple columns

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"jhicsupt" wrote in message
...
Thanks so much!!! This worked like a charm!

"T. Valko" wrote:

Data in the range A2:B8. Assuming no empty cells within the range.

E2 = Cancelled
E3 = Active

Enter this array formula** in F2 and copy down to F3:

=SUM(--(FREQUENCY(IF(A$2:A$8=E2,MATCH(B$2:B$8,B$2:B$8,0)) ,ROW(B$2:B$8)-ROW(B$2)+1)0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"jhicsupt" wrote in message
...
I have two columns:
A B
Cancelled ABC Company
Cancelled ABC Company
Active ABC Company
Cancelled ABC Company
Cancelled XYZ Company
Cancelled John Doe Company
Active The Smith Company

So I want to return this:
Cancelled 3
Active 2
Meaning that
there are 3 unique values counted once that are "Cancelled"
there are 2 unique values counted once that are "Active"

Thanks in advance






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
Filter Multiple Columns on Multiple Criteria and count the last co LBitler Excel Worksheet Functions 2 February 12th 09 08:36 PM
To count the data using multiple criteria in multiple columns Rajesh New Users to Excel 5 December 15th 08 04:07 PM
Count if Multiple columns Dean Excel Worksheet Functions 2 January 16th 06 12:53 PM
how to count one value or another across multiple columns? MeatLightning Excel Discussion (Misc queries) 10 May 22nd 05 09:23 AM
Count on multiple columns Emece Excel Worksheet Functions 2 March 4th 05 02:52 PM


All times are GMT +1. The time now is 02:10 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"