Thread: VLOOKUP Problem
View Single Post
  #7   Report Post  
Martin P
 
Posts: n/a
Default

To get the order you want, with your sample data in cells C1 to C15, enter
the following:
In cell D1:
=IF(ISTEXT(C1)=FALSE,C1&"x",C1)
In cell E1:
=RIGHT(D1)
In cell F1:
=LEFT(D1,LEN(D1)-1)
Sort by column F ascending, then by column E ascending. Choose to sort
anything that looks like a number as a number in the Sort Warning. Column C
will give you the sort order.

"Tosca" wrote:

Hi everyone

I have Excel 2003 and several named ranges in a workbook. Several of the
named ranges have data such as:

1a
1d
2
3c
3e
5
9
12
14d
14e
21
129
130a
130b
130d

with data to the right of this column which is retrieved via VLOOKUP.

I need to retain the data in this order because this list is used as a drop
down list for data validation. When I set up the VLOOKUP, it generated
some errors so I checked to see if the data were in ascending order and,
needless to say, it reordered this data to:

2
5
9
12
21
129
130a
130b
130d
14d
14e
1a
1d
3c
3e


Is it possible to retain the driving data in the order that I need? The
cell format is "General" and the problem remains when I change this to
"Text". I just wonder if a custom format may allow me to do what I need,
but I haven't got a clue what setting I should make.

Thanks in advance.