Sorting with Multiple Rows per Entry
Ooops formula should be as follows:
=IF(left(B2,4)="Tran",right(B2,5),B1)
I had more than 4 letters in "Trans". An simpler version of this would be as
follows:
=IF(left(B2,4)="Trans",B2,B1)
This would work if you didn't care if the words "TransID" also appeared. The
previous formula is desigend to return the number only. Usefull if you are
then going to use this data to lookup other data.
"WCoaster" wrote:
Insert a new row to left of your dataset.
At the first incidence of TransID enter the following formula: (assumes data
starts at B2, that the TransID is followed by some unique indentifier such as
the TransID number)
=IF(left(B2,4)="Trans",right(B2,5),B1)
Next copy this formula all the way down the row for the entire data set.
Select the entire row, right click, select Paste Special, select Values.
You can now sort the entire data set how ever you want but use the new field
to keep the three rows together.
"Andrew Roberts" wrote:
I've come upon a problem with sorting that I don't know how to
tackle... I have entries in a workbook that I want to sort by a
transaction number, but each entry spans multiple rows. One "entry"
might look like this, for example:
TransID PassengerName Ticket#
leg of travel: Departure Arrival
leg of travel: Departure Arrival
I need to be able to sort by TransID or PassengerName while keeping the
"legs of travel" attached to the correct TransID/Ticket#.
Any Suggestions?
Thanks,
Andrew
|