Count (remove duplicate) in filter - Exel formula

TH123

New Member
Joined
Nov 15, 2022
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Hope to get your support to solve this issue. I've searched in forum & there are many way to do but I still can't do with my data :(
Pls help to review this case & advise which Excel formula should be? (Not VBA or Pivot)

Below are What I want:
1. If I do filter at column B = Petter => formular at A11 will be shown = 4 (count parent vendor name with unique data)
2. If I do filter at column B = David => formular at A11 will be shown = 1 (count parent vendor name with unique data)


Thanks in advance. :)🙏🙏🙏
 

Attachments

  • Untitled (1).png
    Untitled (1).png
    5.8 KB · Views: 8

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(A2:A10,B2:B10="Petter")))
 
Upvote 0
It's a LOT easier to work with if the sample is posted using XL2BB or at least text. Also, you need someplace to chose what you're looking for.

It sounds like you're actually looking for a specific value in column A and need to specify what value you're looking for. Under that assumption:
Book1
AB
1Parent Vendor NamePerson Name
2APeter
3BPeter
4BPeter
5CPeter
6DPeter
7EDavid
8EDavid
9EDavid
10EDavid
111
12Select Vendor: E
Sheet1
Cell Formulas
RangeFormula
A11A11=IF(OR(B12="A",B12="B",B12="C",B12="D"),COUNTA(UNIQUE(FILTER(A2:A10,B2:B10="Peter"))),COUNTA(UNIQUE(FILTER(A2:A10,B2:B10="David"))))
Cells with Data Validation
CellAllowCriteria
B12List=$A$2:$A$10
The formula could be extended using IFS instead of just IF, but it does get nasty!

I'm on the Insider Beta, so not sure if this has been released in the released version, but if you look at the formula for the Data Validation list, it includes the entire A2:A10 range, but presents a unique list - that is "B" is only listed once. It's a great enhancement of the Data Validation List, but it needs a Sort option.
 
Upvote 0
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(A2:A10,B2:B10="Petter")))
Hi Fluff,

Thanks for your advice. It's much helpful if I create data validation separately however I'd like to input formula at row#11 as image => any other way to do if I select person name at column B then data will be linked automaticially at row#11?

I don't know how to upload mini-sheet => I've insert table below for your ref. Could you pls help? 🥰

Thank you.

Example: If I selected "Peter & Total" => result at row#11 should be 4.
If I selected "David & Total" => result at row#11 should be 1

Vendor Name (Column A)Person Name (Column B)
APeter
BPeter
BPeter
CPeter
DPeter
EDavid
EDavid
EDavid
EDavid
Input formula here link with selection at column BTotal
 

Attachments

  • Untitled.png
    Untitled.png
    23.3 KB · Views: 6
Upvote 0
How about with a helper column
Fluff.xlsm
ABC
1Vendor NamePerson NameVisible
2APeter1
3BPeter1
4BPeter1
5CPeter1
6DPeter1
7EDavid1
8EDavid1
9EDavid1
10EDavid1
115Total
Sheet4
Cell Formulas
RangeFormula
C2:C10C2=SUBTOTAL(103,A2)
A11A11=ROWS(UNIQUE(FILTER(A2:A10,C2:C10=1)))


Fluff.xlsm
ABC
1Vendor NamePerson NameVisible
2APeter1
3BPeter1
4BPeter1
5CPeter1
6DPeter1
114Total
Sheet4
Cell Formulas
RangeFormula
C2:C6C2=SUBTOTAL(103,A2)
A11A11=ROWS(UNIQUE(FILTER(A2:A10,C2:C10=1)))
 
Upvote 1
Solution
How about with a helper column
Fluff.xlsm
ABC
1Vendor NamePerson NameVisible
2APeter1
3BPeter1
4BPeter1
5CPeter1
6DPeter1
7EDavid1
8EDavid1
9EDavid1
10EDavid1
115Total
Sheet4
Cell Formulas
RangeFormula
C2:C10C2=SUBTOTAL(103,A2)
A11A11=ROWS(UNIQUE(FILTER(A2:A10,C2:C10=1)))


Fluff.xlsm
ABC
1Vendor NamePerson NameVisible
2APeter1
3BPeter1
4BPeter1
5CPeter1
6DPeter1
114Total
Sheet4
Cell Formulas
RangeFormula
C2:C6C2=SUBTOTAL(103,A2)
A11A11=ROWS(UNIQUE(FILTER(A2:A10,C2:C10=1)))
How intelligent you are! This is exactly what I want. Thanks for your help.;)🥰
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Hi Fluff,

Sorry to disturb you again. I've another data & tried to apply same way but fail. What I need is in last column. Could you pls help to check my formula & adjust accordingly? Hope to get your reply soon. Thanks.

Book1
ABCD
1Order#Submit dateFormula (count how many time each order submit)Needed
2A1-Dec22
3A2-Dec20
4B1-Dec33
5B2-Dec30
6B3-Dec30
7C1-Dec11
Sheet1
Cell Formulas
RangeFormula
C2:C7C2=ROWS(UNIQUE(FILTER($B$2:$B$7,$A$2:$A$7=A2)))
 
Upvote 0
You're welcome & thanks for the feedback.
Hi Fluff,

Sorry, pls ignore my question in #8 above ( I can't delete it so pls just ignore).
My data as below. Logic is: Order#A, how many time submit late Yes & how many time submit late No as Needed data in last column. Could you pls support to give formula?
Thank you in advance.

Book1
ABCDE
1Order#Submit dateLate submission?Formula (count how many time each order submit)Needed
2A1-DecNo1
3A2-DecYes1
4B1-DecNo1
5B2-DecYes2
6C1-DecNo1
7A1-DecNo0
8B3-DecYes0
Sheet1
 
Upvote 1
As this is a different question, it needs a new thread. Thanks
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,603
Members
452,660
Latest member
Zatman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top