I have a zap that pulls "Email" data from a spreadsheet, I also have a query that pulls "NAME" data from a different spreadsheet, but when I try to sort it, the data gets misplaced, eg. blank rows appear on top, and in the middle the data gets misaligned.

I'm attaching 2 screenshots to show the problem.

http://prntscr.com/e9b7yu <- Data is not sorted just placed as it is in the original sheet.

http://prntscr.com/e9b8gj <- Data is sorted by A-Z. As you can see the data is misplaced and many email don't match the respective names.

When I sort data by Z-A some emails match, while others don't.

My question is if there's some sort of a code or something to stop this from happening.

  • Welcome to Web Applications. You will have more chances to get an answer if you include the images in the question instead of adding a link, by the other hand on this site we expect that askers include a brief description of they search/research efforts and a simplified version of the formula/code they tried. For further details please take the tour and checkout How to Ask. Feb 16, 2017 at 3:54

1 Answer 1


It seems you are sorting a single column when you need a pair to be sorted together. Taking what is on the left and clicking Sort as shown should return the order as shown on the right:

WA103168 exmple

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.