Sheets Tip 358: What do you think happens with this formula?


Brought to you by:


Hi Reader,

Welcome to the Google Sheets Tips newsletter #358, your Monday morning espresso, in spreadsheet form!

Today's tip comes from an accidental discovery I made whilst researching a trick with the LEFT and RIGHT functions.

Let me ask you...

What do you think happens with this formula? (Answer before trying it in your Sheet ;) )

= "A" < "B"

Check out the answer in today's tip and see a real-world application below.


➜ News

I.
Google had its day of reckoning in front of the courts last week and the results were in their favor. They must share some of their data with rivals but do not need to sell off Chrome. Good news for investors... the share price jumped 8% that day.

Read more here >>


Brought to you by: TabTabTab

Freak in the sheets that will leave you wanting more

TabTabTab fills in missing data and cleans columns, right inside Google Sheets. Just tell it what you want, in plain English, and it'll do the grunt work for you.

🔍 Analyze on command: clean data, write formulas, and spin up quick models while you stay in the flow.

📊 Turn numbers into stories: ask for “sales by week” or “attendance by month” and TabTabTab will generate clean, readable visuals, including native Sheets charts.

⤵️ Enrich rows automatically: pull data from the web, extract tables from PDFs, and drop results into Sheets without the CSV shuffle.

Used by professionals across leading tech companies and universities.


➜ Sheets Tip #358: Alphabet Comparison Trick

So it turns out you can use comparison operators (less than "<" and more than ">") with text strings!

For example, ="A"<="B" outputs TRUE because the A is before B in the alphabet.

(One way to understand this is to convert the letters to their decimal unicode characters and determine which is bigger or smaller. The unicode character for "A" is 65 in decimal terms. "B" is 66, etc.)

More examples:

So this is quite interesting!

Let's see a real-world application.

Practical Use Case

Suppose we work in a library and want to order our books into groups based on the first letter of the author's surname.

We can use this formula to do that!

=IF(LEFT(A2)<="M","A–M","N–Z")

Firstly, the LEFT function is used to get the first letter of the surname.

Quick tip: LEFT(A2) is shorthand for LEFT(A2,1)

This letter is compared to "M" and the surnames are then assigned a group by an IF function.

In our Sheet:

A neat little formula!

What if you want more groups?

Use an IFS function (here combined with LET for readability) to achieve that:

=LET( l , LEFT(A2), IFS( l<="G" , "A-G", l<="M" , "H-M" , l<="S" , "N-S" , l<="Z" , "T-Z" ))

In our Sheet:

Very satisfying! I do love a good formula 😍


If you enjoyed this newsletter, please forward it to a friend who might enjoy it.

Have a great week!

Cheers,
Ben

P.S. Phew and nope

Google Sheets Tips

Get better at working with Google Sheets! Join 50,000 readers to get an actionable tip in your inbox every Monday.

Read more from Google Sheets Tips

Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #367, your Monday morning espresso, in spreadsheet form! For my birthday this year, my wife bought me a half-day fly fishing lesson. I had previously tried casting with a fly rod a few years ago in Wyoming, and have been keen to have another go ever since. As a middle-aged dad, my life is, well... maybe a little... predictable. In a good way. Family, work, exercise outdoors, eat, sleep, and repeat. It's a wonderful,...

Hi Reader, Welcome to the Google Sheets Tips newsletter #366, your Monday morning espresso, in spreadsheet form! ➜ News I.Gemini in Google Sheets can now analyze data across multiple tables. Excellent news! Read more here >> II.Google's Gemini Deep Research now integrates with your Workspace content, including Sheets. (This is only available for paid Workspace accounts.) Read more here >> ➜ Sheets Tip #366: Stack lists with the magic of TOCOL Suppose we have lists of names like this: In this...

Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #365, your Monday morning espresso, in spreadsheet form! Fall is beautiful on the Eastern seaboard of the US right now. The colors near me are peaking in an explosion of reds, oranges, purples, and yellows: ➜ News I.More powerful pivot tables now available in Connected Sheets. Connected Sheets lets you use the Sheets interface to analyze BigQuery data (huge datasets with millions of rows). Read more here >> II.Google...