© 2003 Information Disciplines, Inc., Chicago
NOTE: This article may be circulated freely as long as the copyright notice is included.
The usual solution in procedural programming is to store the name in two fields. We sort on the one containing the body of the name, e.g. "Tale of Two Cities", and we display the concatenation of the two.
That solution is also available and fairly easy in spreadsheet models.
The following solution works in both Quattro Pro® and Excel®.
We put the actual data in two hidden columns, say Y and Z.
| Y | Z |
| The | Barber of Seville |
| Carmen | |
| Don Giovanni | |
| Madama Butterfly | |
| The | Marriage of Figaro |
| Die | Meistersinger |
| Der | Rosenkavalier |
| Salome | |
| La | Traviata |
| Il | Trovatore |
| Turnadot | |
| A | View from the Bridge |
When we sort (Data Sort command) we use the right column
as the key.
Format Column Hide command
Format Block command. Then
select Reveal/Hide tab.
Your choice should depend on the complexity of the whole spreadsheet model, the frequency of entering new data in those columns, and the spreadsheet processor you're using.
=if(isblank(Y1),Z1,Y1 & " " & Z1) ---- (Excel)
@if(@isblank(Y1),Z1,Y1 & " " & Z1) -- (QuattroPro)
Alternative formulas, some simpler, are available in both spreadsheet
processors, but this one (except for the QuattroPro function
designator @) works for both.
It will
almost surely be handled correctly should anyone ever import this
spreadsheet model into a different spreadsheet processor.
The result will look like this:
| D |
| The Barber of Seville |
| Carmen |
| Don Giovanni |
| Madama Butterfly |
| The Marriage of Figaro |
| Die Meistersinger |
| Der Rosenkavalier |
| Salome |
| La Traviata |
| Il Trovatore |
| Turnadot |
| A View from the Bridge |
That's the way most users would expect the list to be alphabetized.
Note: This column should be protected so that users don't forget and enter data into it.
Return to Spreadsheet guidelines
IDI home page
Last modified 15 May 2004