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

indexing data at four levels

Status
Not open for further replies.

sunnytahir

Programmer
May 11, 2003
32
Dear Sir,
i want to index some data in excel four columns.
but in in excel it can be only indexed three columns.

thanks in adv.
 
If by index, you mean SORT - just concatenate the 4 columns you want to sort on. Eg - if they are in cols A-D, then in a spare column at the end, use

=A2&B2&C2&D2
(assumes you are using headers)
Then copy that down and sort on that column

Rgds, Geoff
Si hoc legere scis, nimis eruditionis habes
Want the best answers to your questions ? - then read me baby one more time - faq222-2244
 
dear Geoff,
i do not want to concatenate data. i only want data in four columns. which should be indexed in not three but 4 columns.
regards.
sunny
 
bit out of luck then aren't you.
What's the problem with adding an extra column to the end and then sorting on that ???

Rgds, Geoff
Si hoc legere scis, nimis eruditionis habes
Want the best answers to your questions ? - then read me baby one more time - faq222-2244
 
Your luck could be back in again.

Its not a VBA question but a general Excel question. You can sort by four columns in Excel by sorting twice. Firstly sort by the least important column and then sort again by the other three remaining columns.

For example:

Say you want to sort column A, B, C and D in that order.
First sort by column D only. Secondly sort by columns A, B and C. You will now find that all four columns are in order.

Hope this helps,
TopJack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top