A little help to do the following:

I am good with Queries however, can't find if it is possible to do the following:

=Query(range, "Select * where B begins with (**want a range from A to Can**) to query by last names within the letters A to Can. Hope that makes sense.


Use the following as your "Select" clause:

"Select * Where UPPER(B) >= 'A' AND UPPER(B) < 'CANZ'"

I followed CAN with Z so that all words beginning with CAN would be selected (e.g., "Canada," "canopy," etc.).
I could have entered CAO to get the same results here, since every word beginning with CAN... will fall before CAO alphabetically.

The gist here is that, because all alphanumeric characters exist on the ASCII chart, they can be compared as equal, greater-than or less-than just like true numbers.

  • Excellent solution. Kudos Erik :) – marikamitsos Feb 13 at 22:36
  • Thanks, @marikamitsos. – Erik Tyler Feb 14 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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