Google Sheets QUERY Function Ascending Sort Issue with ORDER BY Clause

I have a main spreadsheet called “master” where I store all my data. Column A contains people’s names. I created a second sheet to display specific columns from the master sheet using a QUERY formula in cell A1:

=QUERY(master!1:1000; "select A,G,K,N order by A"; 1)

This formula doesn’t work properly, but when I change it to ... order by A desc it works perfectly. I need to display the results in alphabetical ascending order instead of descending. What’s the correct syntax to make the QUERY function sort data from A to Z?

check for blank rows at the top of your data - I had the same issue and it was empty cells screwing up the sort. Add where A is not null to your query: =QUERY(master!1:1000; "select A,G,K,N where A is not null order by A asc"; 1). fixed it for me when regular asc woudn’t work.

Had this exact problem last month - drove me crazy for hours. The issue’s usually your header row setup. Since you’re using 1 as the header parameter, your actual data needs to start in row 2. What fixed it for me was adjusting the range to avoid header conflicts. Try =QUERY(master!2:1000; \"select A,G,K,N order by A asc\"; 0) instead. The 0 tells Sheets there’s no header in your selected range, which stops sorting conflicts. Also check that your name entries don’t start with numbers or special characters - that’ll mess with alphabetical ordering even when your syntax is right.

I’ve been there! This usually happens when your column A has mixed data types or formatting issues. Google Sheets gets confused when some cells are text, others are numbers, or there’s inconsistent formatting. First, check that all entries in column A match - same data type, same format. Use TRIM to clean up any extra spaces, and make sure everything’s formatted as text if that’s what you want. Once I fixed these issues, order by A worked perfectly. Also try explicitly adding asc to your command, even though it’s the default. Sometimes being specific helps.