#### Re: Sorting the data

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."

=IF(C5="M",A5,B5)

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.

Ernie Fine
Vienna, VA, USA

At 10:06 PM 9/2/99 PDT, you wrote:
Dear JRIERS,

I am the Plockoordinator:-), and sent more than 14000 records during
the past year, while many more still to be posted in the future, mainly
from the Russian years of the Mormons microfilms >from the town of Plock.
I have all the data sent to JRI database. It is in Excel. I want to sort
the data according the surnames and than the type and than the year.
I need to sort of differently when it is M - marriages.
When type is M, the sort key should be the surname of husband, but
the Surname of the bride should be under it.

How do I do that?

Thanks in advance for the tip, shalom,