Count the min unique items excluding blanks

Blunder1

Active Member
Joined
Jun 2, 2010
Messages
250
Hi All,

I need a formula (cant use filters ot pivot table for this spreadsheet) that will count the lowest number on unique items in columns B. The amont of rows in columns B will change daily and intra day but i dont want to keep adjusting the formula parameters ot including blank cells.

This is the formula i'm using is below. I need this to be generic to column B

Code:
=IF('Cash Manual Matching'!B1="","",MIN(COUNTIF('Cash Manual Matching'!B2:B1859,'Cash Manual Matching'!B2:B1859)))

Thanks

Blunder
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
What type of data is in column B (strings or numbers)? I'd reccomend creating a named range that is defined as either:

String Data:
='Cash Manual Matching'!B2:INDEX('Cash Manual Matching'!B:B,MATCH(REPT("Z",255),'Cash Manual Matching'!B:B))

Numerical Data:
='Cash Manual Matching'!B2:INDEX('Cash Manual Matching'!B:B,MATCH(9.99E+307,'Cash Manual Matching'!B:B))
 
Upvote 0
Thank you this, but the formula give me the cell value, what i need is the amount.
Ie if the columns had:

121
121
222
222
222
222
322
322
322
322
322
322
The formula would then give a result of 2 ( being only two items in the smallest unique group)

Thanks
 
Upvote 0
Hi All,

I need a formula (cant use filters ot pivot table for this spreadsheet) that will count the lowest number on unique items in columns B. The amont of rows in columns B will change daily and intra day but i dont want to keep adjusting the formula parameters ot including blank cells.

This is the formula i'm using is below. I need this to be generic to column B

Code:
=IF('Cash Manual Matching'!B1="","",MIN(COUNTIF('Cash Manual Matching'!B2:B1859,'Cash Manual Matching'!B2:B1859)))

Thanks

Blunder
Hmmm...

Is this what you mean...

<TABLE style="WIDTH: 54pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=72 border=0 x:str><COLGROUP><COL style="WIDTH: 54pt" width=72><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 54pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=72 height=17>data1</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data1</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data2</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data2</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data2</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data3</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data3</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>data3</TD></TR></TBODY></TABLE>

Data1 appears the fewest times so the result you want is 2?
 
Upvote 0
Thank you this, but the formula give me the cell value, what i need is the amount.
Ie if the columns had:

121
121
222
222
222
222
322
322
322
322
322
322
The formula would then give a result of 2 ( being only two items in the smallest unique group)

Thanks

I meant to create a named range, not replace the formula.

Try this, go to Insert>Name>Define. Give it the name "ColB", and define the range to be:
='Cash Manual Matching'!B2:INDEX('Cash Manual Matching'!B:B,MATCH(9.99E+307,'Cash Manual Matching'!B:B)).

Then in your worksheet, change your formula to:
=IF('Cash Manual Matching'!B1="","",MIN(COUNTIF(ColB,ColB)))
 
Upvote 0
Thank you this, but the formula give me the cell value, what i need is the amount.
Ie if the columns had:

121
121
222
222
222
222
322
322
322
322
322
322
The formula would then give a result of 2 ( being only two items in the smallest unique group)

Thanks
Try this array formula**:

=SMALL(FREQUENCY(A2:A13,A2:A13),SUM(IF(FREQUENCY(A2:A13,A2:A13)=0,1))+1)

** 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.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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