How might one generate a distinct list that keeps a static order?

mwscarponi

New Member
Joined
Mar 25, 2018
Messages
7
I am currently generating a distinct list from a list with duplicates using:

=IFERROR(INDEX(C15:C50, MATCH(0, INDEX(COUNTIF(D50:D50, C15:C50), 0, 0), 0)), "")

However, when the source list changes, the entries of the distinct list will (potentially) reorder. This is messing up another purpose of the worksheet. Is there a way to "lock in" the cells of the distinct list as they propagate?


EXAMPLE:

If my source list is:

Orange
Red
Orange


My distinct list is:

Orange
Red

But if the source list changes to:

Blue
Blue
Orange
Red
Orange

The distinct list will be:

Blue
Orange
Red

But this changes Orange and Red from the 1st and 2nd cells in the list to the 2nd and 3rd. I need them to stay where they originate, and for the new entry (Blue) to be added at the end of the distinct list.

Thanks!
 
I'm not sure I understand what you're suggesting in that case.

Blanks can be included or not, either would be fine.
What would be the advanced filter option?

If your source data (including header) starts in A1, then define a name called source with the formula: =OFFSET(Sheet4!$A$2,0,0,COUNTA(Sheet4!$A:$A),1)

and you won't have to continuously update the formula above. Or just highlight the range, and under advanced filter check unique records only to bypass the formula method altogether. Then the only manual tasks will be pasting each new source directly below the other.
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Then the only manual tasks will be pasting each new source directly below the other.
Yeah, my goal was to be able to keep the source list in it's slotted order, where a new entry could go in at any blank cell (above or below existing entries in the list). That's precisely why the distinct list keeps changing in order. I'm pretty sure I wouldn't have to change anything as the sheet currently stands if the source list was created top down.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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