ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   List sorting (https://www.excelbanter.com/excel-discussion-misc-queries/183599-list-sorting.html)

nathan_savidge

List sorting
 
Hi

I have data validation on a cell, that is taking its options from another
range of cells. This works fine, however the list is defaulting to the blank
entries. I wish it to default to the 1st option in the list.

Thanks

Nathan.

Gary''s Student

List sorting
 
If your data validation list contains blanks, use another list that does not.

Say the list is now from A1 thru A500. In G1 thru G500 enter the array
formula:

=IF(ROWS($1:1)<=COUNTA($A$1:$A$500),INDEX($A$1:$A$ 500,SMALL(IF($A$1:$A$500<"",ROW($A$1:$A$500)-MIN(ROW($A$1:$A$500))+1),ROWS($1:1))),"")

and copy down. (array formulas are entered with CNTRL-SHFT-ENTER rather
than just touching the ENTER key)
--
Gary''s Student - gsnu200779


"nathan_savidge" wrote:

Hi

I have data validation on a cell, that is taking its options from another
range of cells. This works fine, however the list is defaulting to the blank
entries. I wish it to default to the 1st option in the list.

Thanks

Nathan.



All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com