Sort formula that also handles duplicates

cloud2828

New Member
Joined
Jul 16, 2019
Messages
43
I have a table with 4 columns and information in each column can repeat where:
Column 1 is "NAMES"
Column 2 is "Start date"
Column 3 is "End date"
Column 4 is "Description"

I initially used the built in sort and kept replying to handle this but after a while it became troublesome as there is a lot of downtime when using "Reapply". More insight on this table is that you input data here and it appears in a calendar on another sheet, how my formula for this works is that it only accepts the unique information at the top of the table but I would like data to be overwritten instead of having to search for it in the table and this is where the sort formula comes in. Any ideas on how I can get this done?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I'm currently using a custom sort formula made with if statements:
=IF(E26="Aa";1;IF(E26="Ap";3;IF(E26="Ar";2;IF(E26="Os";9;IF(E26="Ts";10;IF(E26="Ps";11;IF(E26="Ss";12;IF(E26="J";4;IF(E26="Es";5;IF(E26="IL";6;IF(E26="Sp";8;IF(E26="Stl";8;IF(E26="El";17;IF(E26="Elh";18;IF(E26="Sl";19;IF(E26="Slh";20;IF(E26="Slc";21;IF(E26="Slch";22;IF(E26="LS";23;IF(E26="P";13;IF(E26="O";14;IF(E26="S";15;IF(E26="T";16;"X")))))))))))))))))))))))

The problem with this is that I can't use index match to sort because of the duplicates, wherever there is a duplicate, I get "#N/A" so I'm not able to replicate the table in a sorted form. Please let me know if there's any information I'm leaving out. Also, this is the index match formula that is giving me the errors:

=INDEX($B$31:$F$36;MATCH(ROWS($H$26:H26);$F$31:$F$36;0);1)
 
Upvote 0
You could give examples of what you have and the expected result.
 
Upvote 0
Consider the CSE formula
=INDEX($C:$C, 1000*MOD(SMALL(COUNTIF(B:B,"<="&$B$1:$B$5)+ROW($B$1:$B$5)/1000,ROW(A1)),1), 1)

put it in a cell and it will return the value from column C that goes with the smallest value in column B.

drag it down and it will return the second smallest value from column B etc, note that it will account for duplicate entries in column B.
 
Upvote 0

Forum statistics

Threads
1,224,749
Messages
6,180,731
Members
452,995
Latest member
isldboy

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