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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Space Character and Sort Sequence in Excel

Status
Not open for further replies.

DJB1954

Technical User
Aug 9, 2006
3
GB
I have to import from Word a table that needs sorting. The cells in certain columns in the Word table may contain entries like (9) or (a) or (a),(b) or may be blank. I prepare the Excel table by formatting the receiving columns as text. When I paste in the data, I use Paste/Special/text. These two steps are necessary to avoid (9) becoming -9 in Excel.

I sort by columns D and E and then by A, B and C, in both cases in ascending order. I get a result like the following:
Columns A B C D E
Constant Text r 4 (1) (a)
Constant Text r 4 (1) (a)-(d)
Constant Text r 4 (1) (b), (ba)
Constant Text r 4 (1) (c), (d)
Constant Text r 4 (1)
Constant Text r 4 (1)
Constant Text r 4 (1)

However, what I want to achieve is a situation where the last three rows shown are actually the first three becasue, logically (for my application), a blank precedes a lower level of reference detail.

I have tried to use formulae like =IF(ISBLANK(E1),CHAR(255), IF(ISTEXT(E1),E1,TEXT(E1,"@"))) in a helper column, say Column F and replace E with F in the sort instruction. This makes no difference.

Any help would be gratefully appreciated.

DJB1954
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top