Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 2nd 19, 02:19 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2018
Posts: 15
Default Counting with two criterias

I have a list like this

A B
Var1 Item1
Var2 Item1
Var3 Item2
Var1 Item2
Var3 Item1
Var1 Item1

I would like to count the number of items in Column . Each item can be counted more than once, but only if the name in column a is different. In this case the resultat should be 5 as the last row has same name and Item number as a previous row and is already counted.

Jan

  #2   Report Post  
Old October 2nd 19, 06:01 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2019
Posts: 5
Default Counting with two criterias

Daddy Sage wrote:

I have a list like this

A B C
Var1 Item1 Var1Item1
Var2 Item1 Var2Item1
Var3 Item2 Var3Item2
Var1 Item2 Var1Item2
Var3 Item1 Var3Item1
Var1 Item1 Var1Item1

I would like to count the number of items in Column . Each item can be
counted more than once, but only if the name in column a is different. In
this case the resultat should be 5 as the last row has same name and Item
number as a previous row and is already counted.


Make a column C = A&B and count in that column.


--
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez lui leraillez.com
  #3   Report Post  
Old October 2nd 19, 09:36 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2018
Posts: 15
Default Counting with two criterias

onsdag den 2. oktober 2019 kl. 19.01.11 UTC+2 skrev Benoît:
Daddy Sage wrote:

I have a list like this

A B C
Var1 Item1 Var1Item1
Var2 Item1 Var2Item1
Var3 Item2 Var3Item2
Var1 Item2 Var1Item2
Var3 Item1 Var3Item1
Var1 Item1 Var1Item1

I would like to count the number of items in Column . Each item can be
counted more than once, but only if the name in column a is different. In
this case the resultat should be 5 as the last row has same name and Item
number as a previous row and is already counted.


Make a column C = A&B and count in that column.


--
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez lui * leraillez.com


I can do that, but it will still count all and duplicates are not to be counted more than once.
  #4   Report Post  
Old October 2nd 19, 10:28 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2018
Posts: 15
Default Counting with two criterias

onsdag den 2. oktober 2019 kl. 22.36.26 UTC+2 skrev Daddy Sage:
onsdag den 2. oktober 2019 kl. 19.01.11 UTC+2 skrev Benoît:
Daddy Sage wrote:

I have a list like this

A B C
Var1 Item1 Var1Item1
Var2 Item1 Var2Item1
Var3 Item2 Var3Item2
Var1 Item2 Var1Item2
Var3 Item1 Var3Item1
Var1 Item1 Var1Item1

I would like to count the number of items in Column . Each item can be
counted more than once, but only if the name in column a is different.. In
this case the resultat should be 5 as the last row has same name and Item
number as a previous row and is already counted.


Make a column C = A&B and count in that column.


--
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez lui * leraillez.com


I can do that, but it will still count all and duplicates are not to be counted more than once.


I found an array formula that will do the trick, but now I wonder if it cn be done without the additional column, that is using oly A and B?

=SUM(IF(C1:C17<"",1/COUNTIF(C1:C17,C1:C17), 0))

  #5   Report Post  
Old October 3rd 19, 12:00 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,727
Default Counting with two criterias

Hi,

Am Wed, 2 Oct 2019 14:28:24 -0700 (PDT) schrieb Daddy Sage:

I found an array formula that will do the trick, but now I wonder if it cn be done without the additional column, that is using oly A and B?

=SUM(IF(C1:C17<"",1/COUNTIF(C1:C17,C1:C17), 0))


try:

=SUMPRODUCT((MATCH(A1:A99&"x"&B1:B99,A1:A99&"x"&B1 :B99,0)=ROW(1:99))*1)-1


Regards
Claus B.
--
Windows10
Office 2016


  #6   Report Post  
Old October 3rd 19, 10:54 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2019
Posts: 5
Default Counting with two criterias

Daddy Sage wrote:

onsdag den 2. oktober 2019 kl. 19.01.11 UTC+2 skrev Benot:
Daddy Sage wrote:

I have a list like this

A B C
Var1 Item1 Var1Item1
Var2 Item1 Var2Item1
Var3 Item2 Var3Item2
Var1 Item2 Var1Item2
Var3 Item1 Var3Item1
Var1 Item1 Var1Item1

I would like to count the number of items in Column . Each item can be
counted more than once, but only if the name in column a is different.
In this case the resultat should be 5 as the last row has same name
and Item number as a previous row and is already counted.


Make a column C = A&B and count in that column.


I can do that, but it will still count all and duplicates are not to be
counted more than once.


Take a look at :

https://www.ablebits.com/office-addi...lues-in-excel/

--
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez lui leraillez.com


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
Help with Counting Multiple Criterias Munster Excel Programming 2 March 15th 17 06:45 PM
Help with counting two different criterias. Jboo Excel Discussion (Misc queries) 9 February 24th 09 08:50 PM
If Criterias Ricardo Excel Discussion (Misc queries) 3 April 5th 07 01:06 PM
Counting instances based on two criterias [email protected] Excel Worksheet Functions 7 June 5th 06 07:18 PM
Counting cells if special criterias are true a94andwi Excel Worksheet Functions 12 May 2nd 06 07:07 AM


All times are GMT +1. The time now is 12:27 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017