## Find max unique value from a range that have duplicate numbers and blanks

**Array formula in cell D11:**

**Array formula in cell D12:**

**Formula in cell D15:**

**Formula in cell D16:**

**Array formula in cell G11:**

### Explaining array formula in cell D11

**Step 1 - Count the number of cells within a range that meet a given condition**

COUNTIF(Table1[Value],Table1[Value])

returns

{1;1;1;0;1;1;1;1;1;...}

**Step 2 - Check if value in array is a duplicate**

COUNTIF(Table1[Value],Table1[Value])<>1

becomes

{1;1;1;0;1;1;1;1;1;...}<>1

and returns

{FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE;...}

** Step 3 - Check if table value is a blank**

(Table1[Value]="")

returns

{FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE; ...}

**Step 4 - Return table value if conditions are met**

IF((COUNTIF(Table1[Value],Table1[Value])<>1)+(Table1[Value]=""),"",Table1[Value])

becomes

IF({FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE; ...}, "", {72;373;230;0;311;424;460;418;665})

and returns

{72;373;230;"";311;424;460;418;665;...}

**Step 5 - Return max value**

MAX(IF((COUNTIF(Table1[Value],Table1[Value])<>1)+(Table1[Value]=""),"",Table1[Value]))

becomes

=MAX({72;373;230;"";311;424;460;418;665;...})

and returns 694 in cell D11.

### Download excel *.xlsx file

Find max unique value from a range that have duplicate numbers and blanks.xlsx

How to use a Table name in Data Validation Lists and Conditional Formatting formulas

David Hager gave this valuable comment about how to reference a table name in conditional formatting formulas: =INDIRECT("Table1[Start]") Watch this video to [โฆ]

Extract unique distinct values from a filtered Excel defined Table [UDF and Formula]

Robert Jr asks: Oscar, I am using the VBA code & FilterUniqueSort array to generate unique lists that drive Selection [โฆ]

Count unique distinct values in a filtered Excel defined Table

This article demonstrates a formula that counts unique distinct values filtered from an Excel defined Table. Debra Dalgleish described in [โฆ]

Remove common records between two data sets

This article demonstrates how to filter records occurring in only one out of two Excel defined tables. It also shows [โฆ]

Cyril asks how to hide all columns of a range except columns whose header is found in specific cells. I am [โฆ]

Highlight duplicates in a filtered Excel defined table

You can highlight duplicates in an excel defined table using conditional formatting. However, that wonยดt work if you only want [โฆ]

Copy filtered Excel tables [VBA]

Today I want to share some pretty useful macros. My first macro copies an excel defined table with vba. It is [โฆ]

Copy excel table filter criteria [VBA]

Here is how to copy filter criteria from an excel table and use the same table filters on another table. [โฆ]

This article demonstrates how to filter duplicate records using a simple formula and an Excel defined table.

Quickly search a data set with many criteria

Mohsin Ali Raziq asks: I have problem, and o dont know how to solve it, i have data of almost [โฆ]

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Paste image link to your comment.

**Contact Oscar**

You can contact me through this contact form