Formula for count unique value in large data with one criteria?

babaso_tawase

Board Regular
Joined
Feb 5, 2017
Messages
73
Office Version
  1. 2007
Platform
  1. Windows
Hi, I have large data (about 7000 rows) like below format in excel 2007 version. I want to count no of batches (data in number and text format with repeated value) in column 2nd with corresponding name in 1st column. like how many batches corresponding to name ABC and answer should be 3.

I using Arrey formula as below

in first step listing unique list
{=IFERROR(INDEX($B$3:$B$15, MATCH(0, IF($A$1=$A$3:$A$15, COUNTIF($F$1:$F2, $B$3:$B$15), ""), 0)),"-")}

in second step counting
=COUNTIF(F2:F19,"<>*-*")

This step gives correct answer but excel sheet becomes very slow and unresponsive for large data.

please suggest is there any other solution or formula.


A1 cell = ABC
NameBatch No.
ABC121(1123)123
AB12456
AC125(1256)456
ABCB1245
ABC4568
ABCB1245
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
You could test this structure for comparative responsiveness with your larger data.

23 12 10.xlsm
ABCDE
1ABCCount Unique
2NameBatch No.3
3ABC121(1123)1231
4AB12456 
5AC125(1256)456 
6ABCB12451
7ABC45681
8ABCB1245 
Unique List
Cell Formulas
RangeFormula
E2E2=SUM(D3:D7000)
D3:D8D3=IF(A3=A$1,IF(COUNTIFS(A$3:A3,A3,B$3:B3,B3)=1,1,""),"")
 
Upvote 0
Thanks a lot, working fine... Is any formula to list out of unique value of respective name from above data, in different sheet.

i.e. For ABC
like this
Sr.No.Batch No.
1121(1123)123
2B1245
34568
 
Upvote 0
Could you use this?

Change the formulas that I used above to the new ones below (& note the zero in cell D2)

babaso_tawase.xlsm
ABCDE
1ABCCount Unique
2NameBatch No.03
3ABC121(1123)1231
4AB12456 
5AC125(1256)456 
6ABCB12452
7ABC45683
8ABCB1245 
Count Unique
Cell Formulas
RangeFormula
E2E2=MAX(D3:D7000)
D3:D8D3=IF(A3=A$1,IF(COUNTIFS(A$3:A3,A3,B$3:B3,B3)=1,LOOKUP(9^9,D$2:D2)+1,""),"")


Now use this in the other worksheet

babaso_tawase.xlsm
AB
1Sr.No.Batch No.
21121(1123)123
32B1245
434568
5  
6  
7  
8  
9  
10  
Unique List
Cell Formulas
RangeFormula
A2:A10A2=IF(B2="","",N(A1)+1)
B2:B10B2=IF(ROWS(B$2:B2)>'Count Unique'!E$2,"",INDEX('Count Unique'!B:B,MATCH(ROWS(B$2:B2),'Count Unique'!D:D,0)))
 
Upvote 0

Forum statistics

Threads
1,223,842
Messages
6,174,981
Members
452,596
Latest member
Anabaric

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