Create a calculated field like this ---
Sort_Field: IIF(Left([Z],1)="A", [X], IIF(Left([Z],1)="B", [Y], [Z]))

Signature
KARL DEWEY
Build a little - Test a little
> Within one group I have, let's say, a return that starts with "A" and "B and
> "C".
> if the value starts with "A" I want to sort by field [x] if it starts with
> "B" sort by field [y]... etc.