Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Sort Query

Status
Not open for further replies.

thomsons

Programmer
Dec 16, 2002
19
0
0
GB
I have one workbook which contains two worksheets.

I am trying to do an identical sort on the first column but the output is different - one does it numeric alpha and another which does it only numeric.

I have tried changing the format on both to be either general or text but I still can't get them to sort the same way and I need this so that I can use the Vlookup function.

Column A on Worksheet 1:-

24000000
00880DVCI
00880DVCP
00880DVIN
00880DVIR
00880LIFG
00880OPCP
00880PRIN
244BO061L

Column A on Worksheet 2:-

00880DVCI
00880DVCP
00880DVIN
00880DVIR
00880LIFG
00880OPCP
00880PRIN
24000000
244BO061L

Any help would be greatly appreciated.

Cheers,
S.
 
why do you need this for vlookup ???
If you have FALSE as the 4th argument, vlookup looks for an exact match only - therefore no need for sorting

In terms of the sorting - sounds like one column is TEXT and the other a mix of TEXT and numeric

you can test this by using the =ISTEXT(cell_ref) and =ISNUMBER(cell_ref) functions
REMEMBER - formatting will only change the way something LOOKS. It will NOT change the data behind it, nor the data TYPE

To change text to numbers, use =VALUE(cell_ref)
To change numbers to text, use =TEXT(cell_ref,"0")
and then copy / paste values only over the original data Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top