Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Conditional count of unique values

Using v2003

I'll explain as clearly as possible...

I need a formula that will do a count of unique values in a column based on
the condition of two other columns.

i.e. Col A is financial entity id and has duplicates: there may be 5 line
items in entity 556 and 3 line items in entity 444, 5 line items 768, etc.

Col B has the project impact: one of two values, either "Investment" or "ETC"

Col C has the market ID: NE, SE, NW, SW

I need a formula to return the count of unique financial entities that are
Investment in the SE. For example, if the conditions apply to four of the
five 556 entities, the formula would return "1".

Thanks in advance for any guidance! Hope this is enough info.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Conditional count of unique values

BTW, I've been trying to use an array formula that looks something like this,
but obviously with no luck...

{=COUNT(IF($B$2:$B$1511="Investment",IF($C$2:$C$15 11="NE",SUM(IF(FREQUENCY(IF(LEN(A2:A1511)0,MATCH( A2:A1511,A2:A1511,0),""),
IF(LEN(A2:A1511)0,MATCH(A2:A1511,A2:A1511,0),"")) 0,1)),0),0))}

"Amy" wrote:

Using v2003

I'll explain as clearly as possible...

I need a formula that will do a count of unique values in a column based on
the condition of two other columns.

i.e. Col A is financial entity id and has duplicates: there may be 5 line
items in entity 556 and 3 line items in entity 444, 5 line items 768, etc.

Col B has the project impact: one of two values, either "Investment" or "ETC"

Col C has the market ID: NE, SE, NW, SW

I need a formula to return the count of unique financial entities that are
Investment in the SE. For example, if the conditions apply to four of the
five 556 entities, the formula would return "1".

Thanks in advance for any guidance! Hope this is enough info.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Conditional count of unique values

Try the below with your data in the below format. Please note that this is an
array formula. Within the cell in edit mode (F2) paste this formula and press
Ctrl+Shift+Enter to apply this formula. If successful in 'Formula Bar' you
can notice the curly braces at both ends like "{=<formula}"

=SUM(IF(FREQUENCY(IF(B$2:B$100="Investment",IF(C$2 :C$100="SE",A$2:A$100)),A$2:A$100),1))

Col A Col B Col C
556 Investment NE
556 Investment SE
556 Investment NW
556 Investment SW
556 ETC NE
444 ETC SE
444 ETC NW
444 ETC SW
768 ETC NE
768 Investment SE
768 ETC NW
768 ETC SW
768 ETC NE


If this post helps click Yes
---------------
Jacob Skaria


"Amy" wrote:

BTW, I've been trying to use an array formula that looks something like this,
but obviously with no luck...

{=COUNT(IF($B$2:$B$1511="Investment",IF($C$2:$C$15 11="NE",SUM(IF(FREQUENCY(IF(LEN(A2:A1511)0,MATCH( A2:A1511,A2:A1511,0),""),
IF(LEN(A2:A1511)0,MATCH(A2:A1511,A2:A1511,0),"")) 0,1)),0),0))}

"Amy" wrote:

Using v2003

I'll explain as clearly as possible...

I need a formula that will do a count of unique values in a column based on
the condition of two other columns.

i.e. Col A is financial entity id and has duplicates: there may be 5 line
items in entity 556 and 3 line items in entity 444, 5 line items 768, etc.

Col B has the project impact: one of two values, either "Investment" or "ETC"

Col C has the market ID: NE, SE, NW, SW

I need a formula to return the count of unique financial entities that are
Investment in the SE. For example, if the conditions apply to four of the
five 556 entities, the formula would return "1".

Thanks in advance for any guidance! Hope this is enough info.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Conditional count of unique values

Mental head-slap for making life too complicated! Thanks!!

"Jacob Skaria" wrote:

Try the below with your data in the below format. Please note that this is an
array formula. Within the cell in edit mode (F2) paste this formula and press
Ctrl+Shift+Enter to apply this formula. If successful in 'Formula Bar' you
can notice the curly braces at both ends like "{=<formula}"

=SUM(IF(FREQUENCY(IF(B$2:B$100="Investment",IF(C$2 :C$100="SE",A$2:A$100)),A$2:A$100),1))

Col A Col B Col C
556 Investment NE
556 Investment SE
556 Investment NW
556 Investment SW
556 ETC NE
444 ETC SE
444 ETC NW
444 ETC SW
768 ETC NE
768 Investment SE
768 ETC NW
768 ETC SW
768 ETC NE


If this post helps click Yes
---------------
Jacob Skaria


"Amy" wrote:

BTW, I've been trying to use an array formula that looks something like this,
but obviously with no luck...

{=COUNT(IF($B$2:$B$1511="Investment",IF($C$2:$C$15 11="NE",SUM(IF(FREQUENCY(IF(LEN(A2:A1511)0,MATCH( A2:A1511,A2:A1511,0),""),
IF(LEN(A2:A1511)0,MATCH(A2:A1511,A2:A1511,0),"")) 0,1)),0),0))}

"Amy" wrote:

Using v2003

I'll explain as clearly as possible...

I need a formula that will do a count of unique values in a column based on
the condition of two other columns.

i.e. Col A is financial entity id and has duplicates: there may be 5 line
items in entity 556 and 3 line items in entity 444, 5 line items 768, etc.

Col B has the project impact: one of two values, either "Investment" or "ETC"

Col C has the market ID: NE, SE, NW, SW

I need a formula to return the count of unique financial entities that are
Investment in the SE. For example, if the conditions apply to four of the
five 556 entities, the formula would return "1".

Thanks in advance for any guidance! Hope this is enough info.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Conditional count of unique values

Where would I insert another IF condition? Add column D to your example below
with Area ID in it, each cell with one of three values: Power, Antenna or
Building

Thanks!

"Amy" wrote:

Mental head-slap for making life too complicated! Thanks!!

"Jacob Skaria" wrote:

Try the below with your data in the below format. Please note that this is an
array formula. Within the cell in edit mode (F2) paste this formula and press
Ctrl+Shift+Enter to apply this formula. If successful in 'Formula Bar' you
can notice the curly braces at both ends like "{=<formula}"

=SUM(IF(FREQUENCY(IF(B$2:B$100="Investment",IF(C$2 :C$100="SE",A$2:A$100)),A$2:A$100),1))

Col A Col B Col C
556 Investment NE
556 Investment SE
556 Investment NW
556 Investment SW
556 ETC NE
444 ETC SE
444 ETC NW
444 ETC SW
768 ETC NE
768 Investment SE
768 ETC NW
768 ETC SW
768 ETC NE


If this post helps click Yes
---------------
Jacob Skaria


"Amy" wrote:

BTW, I've been trying to use an array formula that looks something like this,
but obviously with no luck...

{=COUNT(IF($B$2:$B$1511="Investment",IF($C$2:$C$15 11="NE",SUM(IF(FREQUENCY(IF(LEN(A2:A1511)0,MATCH( A2:A1511,A2:A1511,0),""),
IF(LEN(A2:A1511)0,MATCH(A2:A1511,A2:A1511,0),"")) 0,1)),0),0))}

"Amy" wrote:

Using v2003

I'll explain as clearly as possible...

I need a formula that will do a count of unique values in a column based on
the condition of two other columns.

i.e. Col A is financial entity id and has duplicates: there may be 5 line
items in entity 556 and 3 line items in entity 444, 5 line items 768, etc.

Col B has the project impact: one of two values, either "Investment" or "ETC"

Col C has the market ID: NE, SE, NW, SW

I need a formula to return the count of unique financial entities that are
Investment in the SE. For example, if the conditions apply to four of the
five 556 entities, the formula would return "1".

Thanks in advance for any guidance! Hope this is enough info.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Conditional count of unique values

Try
=SUM(IF(FREQUENCY(IF(B$2:B$100="Investment",IF(C$2 :C$100="SE",IF(D$2:D$100="Power",A$2:A$100))),A$2: A$100),1))

If this post helps click Yes
---------------
Jacob Skaria


"Amy" wrote:

Where would I insert another IF condition? Add column D to your example below
with Area ID in it, each cell with one of three values: Power, Antenna or
Building

Thanks!

"Amy" wrote:

Mental head-slap for making life too complicated! Thanks!!

"Jacob Skaria" wrote:

Try the below with your data in the below format. Please note that this is an
array formula. Within the cell in edit mode (F2) paste this formula and press
Ctrl+Shift+Enter to apply this formula. If successful in 'Formula Bar' you
can notice the curly braces at both ends like "{=<formula}"

=SUM(IF(FREQUENCY(IF(B$2:B$100="Investment",IF(C$2 :C$100="SE",A$2:A$100)),A$2:A$100),1))

Col A Col B Col C
556 Investment NE
556 Investment SE
556 Investment NW
556 Investment SW
556 ETC NE
444 ETC SE
444 ETC NW
444 ETC SW
768 ETC NE
768 Investment SE
768 ETC NW
768 ETC SW
768 ETC NE


If this post helps click Yes
---------------
Jacob Skaria


"Amy" wrote:

BTW, I've been trying to use an array formula that looks something like this,
but obviously with no luck...

{=COUNT(IF($B$2:$B$1511="Investment",IF($C$2:$C$15 11="NE",SUM(IF(FREQUENCY(IF(LEN(A2:A1511)0,MATCH( A2:A1511,A2:A1511,0),""),
IF(LEN(A2:A1511)0,MATCH(A2:A1511,A2:A1511,0),"")) 0,1)),0),0))}

"Amy" wrote:

Using v2003

I'll explain as clearly as possible...

I need a formula that will do a count of unique values in a column based on
the condition of two other columns.

i.e. Col A is financial entity id and has duplicates: there may be 5 line
items in entity 556 and 3 line items in entity 444, 5 line items 768, etc.

Col B has the project impact: one of two values, either "Investment" or "ETC"

Col C has the market ID: NE, SE, NW, SW

I need a formula to return the count of unique financial entities that are
Investment in the SE. For example, if the conditions apply to four of the
five 556 entities, the formula would return "1".

Thanks in advance for any guidance! Hope this is enough info.

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 Unique Values but not Filtered or Hidden Values Lee Excel Worksheet Functions 3 June 2nd 09 11:18 PM
Count of unique values Matt Excel Discussion (Misc queries) 8 January 20th 09 07:34 AM
Unique Count when Values 0.01 Jill1 Excel Worksheet Functions 3 November 22nd 06 01:36 PM
Count unique values Mary Excel Worksheet Functions 3 January 20th 06 08:56 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM


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

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"