Ernest Fine <efine@...>
Ada, and others who are interested in solving this type of problem, the
easiest and quickest way to do this is to add another column to the
spreadsheet; this new column will contain either the surname of the
husband, or the surname of the bride. It then becomes one of the sort keys.
To create the contents of this column, an "IF" statement is used.
Let's say the spreadsheet looks something like:
column A = husband surname
column B = bride surname
column C = Type code
column D = new column for surname
In column D, in whatever row the data starts in, place the following
statement. For the sake of example, I am using row "5."
This will result in cell D5 being filled with the contents of cell A5 if
the type code is "M", and D5 being filled with the contents of cell B5 if
A5 is NOT "M." (If using a lower-case "m" - type that value instead of "M"
- it has to match exactly.)
Then, you will do a "fill down" on the formula, to place the formula in all
rows. To do this, click on the first formula cell (the one you just typed
the "IF" statement into, C5 in our example here), and drag, with the mouse,
down that one column so all rows are highlighted. Then perform the "fill"
operation - press the "Ctrl+D" keys.
(Alternatively, since this is a large spreadsheet, click on the first
formula cell, then scroll down to the last formula cell; hold down the
Shift key, and click that last cell. This will highlight all rows
inbetween. Then press the Ctrl+D keys for the fill operation.)
NOTE: the directions above are for Excel 97. Process is similar for other
spreadsheets but exact statements may vary.
Vienna, VA, USA
At 10:06 PM 9/2/99 PDT, you wrote: