Sort dynamic list

abdulhaque

Board Regular
Joined
Dec 2, 2015
Messages
63
=OFFSET($D$2,0,0,COUNTA($D$2:$D$51)-COUNTIF(D2:D51,""),1 this is the formula that creates a dynamic list for a drop down using data from column D. Data in column D is not sorted in alphabetical order. Without having to sort the data in column D, can the list for the drop down using that formula be updated to also sort the data in the drop down?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Re: Sort dymanic list

You would not be able to sort it in the dropdown, if you don't want to sort the original list then you will need to duplicate it in a different column using formulas.
 
Upvote 0
Re: Sort dymanic list

The easiest way to do that would be to use 2 columns.

In E2 and fill down (As this is for a dropdown, I've assumed no duplicates).

=IF(D2="","",COUNTIF(D$2:D$51,"<="&D2))

In F2 and fill down

=IFERROR(INDEX(D$2:D$51,MATCH(ROWS(F$2:F2),E$2:E2,0)),"")

Dropdown formula

=OFFSET($F$2,0,0,MAX($E$2:$E$51),1)
 
Upvote 0
Re: Sort dymanic list

In that case, try changing the first formula to

=IF(D2="","",COUNTIFS(D$2:D$51,"<>",D$2:D$51,"<="&D2))
 
Upvote 0
Re: Sort dymanic list

Hopefully this one will work

=IF(D2="","",COUNTIFS(D$2:D$51,"*?",D$2:D$51,"<="&D2))

The result should start from 1 in the row for 'Add orderable to catalog'

edit:- results for first 3 rows should be 5,11,1
 
Last edited:
Upvote 0
Re: Sort dymanic list

I think that I need to start today again :eeek:

Column F formula should be

=IFERROR(INDEX(D$2:D$51,MATCH(ROWS(F$2:F2),E$2:E$51,0)),"")

The dropdown formula looks correct, but given the mistakes found in the other formulas...
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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