How to make every number in a range of cells unique???

Mark McInerney

Active Member
Joined
Apr 4, 2012
Messages
262
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a large range of data - I need to use range formulas using If and Large combinations to return the largest number when certain conditions are met.

As the dataset is large, there are duplicate values.

As a workaround I add a very small number to every number in the range, to create a unique value in every cell in the range.

Is there a better way to achieve this - make every cell in a range unique?

Thanks - Mark.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi Mark,

I'd actually take a different approach and create a column with the distinct rank. You can then use that rank as you unique identifier to find the row of data you want.

Here's my list of numbers (with many duplicates) and I'm just showing the first 14 of 180 entries. The 314 is the largest number but I can make it rank 1,2,3,4 instead of all 1.

IJK
1NumberDistinct Rank
21147
31148
45094
55882
65883
78727
83141
93142
103143
113144
121355
131356
1432128

<tbody>
</tbody>
Sheet3 (2)

Worksheet Formulas
CellFormula
K2=RANK.EQ(I2,$I$2:$I$181,0)+COUNTIF($I$2:I2,I2)-1

<tbody>
</tbody>

<tbody>
</tbody>


P.S. I'd use the LARGE option of AGGREGATE rather than LARGE as it's faster on large datasets.
 
Upvote 0

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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