Forum Discussion
FatManFluff
Mar 02, 2024Brass Contributor
Sort 2 columns to equal each other
Hi,
I have been trying to look for a way to sort 2 different columns with information so they can equal each other in the same line. The part that makes it a bit complicated is that some field won't be filed and therefore the sort smallest to greatest doesn't work for me because I want them to match up on the same line. I will include an example.
Original Entry:
When I do a regular sort from smallest to largest it does this
Sorting Smallest to Largest:
but what I want it to do is this
What I am looking to do:
Any help or suggestions I would highly appreciate it. I know maybe is something completely easy and maybe I am missing it right in front of me but I can't seem to find a solution.
As variant
=LET(sortedA, SORT(colA), HSTACK(sortedA, XLOOKUP(sortedA,colB,colB,"") ) )
which gives
- FatManFluffBrass Contributor
Thank you for the very quick response, Sergei Baklan,
I've tried copping the formula you provided, but it does not work for me. I've tried to understand the formula to see if I can find the error to fit my sheet but can't seem to correct it.
This is the error I am getting. Also, my original chart is a bit more complex and has more information that I want to be sorted with so I'm not sure if it will be different for that.
This is the error I'm getting.
PS:
This is a little more of what my sheet actually looks like. Radio # and EE# are manually filled in while EE Mame and Manager are filtered through a table with all the information. Time is also auto time stamped. When radios are checked back in (we have 100s) it isn't always the best thing to look up the radio # on check-out then scan on the same row the check-in. Instead I want to be able to scan them in any order then filter out once the shift is done to match the check-in side.
On which Excel platform/version you are? Above formula is for Excel 365.
Please try to open attached file with it if it works in your environment.