A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi, James Lewel
Thank you for using Microsoft products and posting them to the community.
You can try creating a helper column that generates a sorted index in a new column, such as the AZ column:
=SORT(FILTER(ROW(AA:AA), AR:AR=1))
Use these indexes in the AW column to get the sorted AA column data:
=INDEX(AA:AA, AZ1)
Use these indexes in the AX column to get the sorted AB column data:
=INDEX(AB:AB, AZ1)
Then use your formula for the AY column again.
This should correctly match and calculate the sorted data.
I hope the above information can help you. Feel free to send a message if you need further help.
Best wishes
Aiden.C - MSFT |Microsoft Community Support Specialist