How to Use the BAHTTEXT Function in Google Sheets

Published on

We can use the BAHTTEXT Function in Google Sheets to convert a given number to a Thai language text, and “Th” will be the language code of the output.

I have used the DETECTLANGUAGE function to find the code for translating the text.

It’s needless to say, users who know the Thai language can read the output of the BAHTTEXT formula in Google Sheets.

Since I am unfamiliar with this language, I have used the GOOGLETRANSLATE function in Sheets to translate the output into English.

I could find that the formula adds the currency “Baht” for integer and “Satang” for decimal and encountered a few issues in the translation. I’ll come to that later.

First of all, let’s learn how to use the BAHTTEXT text category function in Google Sheets.

BAHTTEXT Function in Google Sheets – Syntax, Arguments, and Examples

Syntax:

BAHTTEXT(number)

Arguments:

number – It’s the number to convert and can be a number, cell reference, array, or array reference.

Formula Examples

The following examples of the BAHTTEXT Function in Google Sheets will help you better understand the ‘number’ argument usage.

Number:

=BAHTTEXT(100)

Cell Reference:

=BAHTTEXT(A1)

Array:

Here you must include the ArrayFormula function.

Further, please make sure sufficient blank cells (here 9) are available below the formula inserted cell to generate the result.

=ArrayFormula(bahttext({1;2;3;4;5;6;7;8;9;10}))

The above formula converts the numbers 1 to 10 into Thai language texts.

Array Reference:

Imagine, you have to convert the numbers in the range/array B2:B11 into Th, using the BAHTTEXT function in Google Sheets.

You can use the below formula for that in cell C2 after deleting existing formulas/values, if any, in C2:C11.

=ArrayFormula(BAHTTEXT(B2:B11))

Key Features

Here are some of the main features of the BAHTTEXT function in Google Sheets.

  • It converts integer and decimal values.
  • Convert negative values. To skip the negative sign, wrap the ‘number’ with the ABS function [E.g. =BAHTTEXT(ABS(B2)].
  • It evaluates a blank cell to 0 (zero) and converts it accordingly.
  • If the number argument is a text, the result would be #VALUE! error
  • The formula has no issue in converting numbers that are formatted to text.
  • An error value causes it to return the same error.

Using BAHTTEXT Function with GOOGLETRANSLATE in Google Sheets

When I first saw this function, I thought we could use it together with GOOGLETRANSLATE to convert numbers to English text.

It does convert, but I am not satisfied with the output. Do you know why?

Please follow the below steps to understand it.

Steps:

  1. Enter a few numbers as per the screenshot below in the range B2:B18.
  2. To convert the entered list of numbers into Thai text, insert =BAHTTEXT(B2) in cell C2 and drag it down. Alternatively we can use =ArrayFormula(BAHTTEXT(B2:B18)) in cell C2 after emptying C2:C18.
  3. To translate the converted Thai text, we can use =GOOGLETRANSLATE(C2,"th","en") in cell D2 and drag it down. The “th” and “en” are the language codes for Thai and English, respectively.
Combined Use of BAHTTEXT and GOOGLETRANSLATE Functions in Google Sheets

See the highlighted texts. If all were perfect, I planned to use REGEXREPLACE or SUBSTITUTE to replace “Baht” and “Satan” with “Dollar” and “Cents,” respectively.

So I left the idea seeing the above output.

That’s all about how to use the BAHTTEXT Function in Google Sheets.

Thanks for the stay. Enjoy!

Resources:

  1. Amount or Numbers to Words Converter Using Google Sheets.
  2. Format Numbers as Currency Using Formulas in Google Sheets.
  3. How to Convert Currency Text to Number in Google Sheets.
  4. Extract Numbers Prefixed by Currency Signs from a String in Google Sheets.
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Lookup Values Under Categories in Excel and Google Sheets

We can use a combination of XLOOKUP and VLOOKUP in both Excel and Google...

Extract Items Under a Category from the Same Column in Excel

In Excel, you can use a combination of the XLOOKUP and DROP functions to...

How to Create a Searchable Table in Excel Using the FILTER Function

Finding specific records, or rows containing the required information, is straightforward in Excel using...

Time Sequences in Excel by Minute, Hour, or Second Increments

Creating time sequences, whether by hour, minute, or second increments in Excel, can be...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.