Get distinct values formula doesnt work

EURUSD

New Member
Joined
Jan 21, 2012
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hi,

I want to do an analysis on a portfolio based on size on account. First step is to map the companies and groups. To be able to do that I need to get the distinct values (cust nr) from a larger dataset. I tried several formulas for example:

=IFERROR(INDEX($A$2:$A$10, MATCH(0, COUNTIF($B$1:B1, $A$2:$A$10), 0)), "")

As is:

1713253312155.png


To be:

1713254157108.png


Is this something that can be done easily?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I suggest you update your profile to show which version of Office you have, as it will affect what formulas can be used.

If you can sort by the first column, then the formula would be pretty simple in any version as you just need to show the value to the left if the value below is different and blank otherwise.
 
Upvote 0
I suggest you update your profile to show which version of Office you have, as it will affect what formulas can be used.

If you can sort by the first column, then the formula would be pretty simple in any version as you just need to show the value to the left if the value below is different and blank otherwise.

Hi,

When trying to sort the table I get an error message "to do that all merged cells must have same size" translated from swedish.

Updated the profile now.

Thanks
 
Upvote 0
Is there a reason you want the layout you posted? A simple =UNIQUE(A1:A100) formula would get a unique list of numbers without gaps, which would usually be preferable for analysis.
 
Upvote 0
Is there a reason you want the layout you posted? A simple =UNIQUE(A1:A100) formula would get a unique list of numbers without gaps, which would usually be preferable for analysis.
In my setup I would like to keep the table with blanks since Im using it for a pivot in the next stage.

I succeeded with the sorting and then I tried =IFS(D10=D11;"") and it return blanks but I need it to also return dist values. How can I combine these formulas?

BR
 
Upvote 0
You'd use =IF(D10=D11;"";D10) so it returns the value only when there is a change. You may want to look at the value above if you want the first item to be flagged.
 
Upvote 0
Also, if you're going to pivot, you'd get unique values anyway when you added it to a row/column field
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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