HomeGoogle DocsSpreadsheetHow to Change a Non-Regional Google Sheets Formula

How to Change a Non-Regional Google Sheets Formula

Published on

This comprehensive guide walks you through the process of seamlessly adapting non-regional Google Sheets formulas to your locale, ensuring error-free operation.

For instance, in VLOOKUP, I typically follow the syntax VLOOKUP(search_key, range, index, [is_sorted]), where a comma serves as the delimiter, or we can call it the argument separator.

However, some of you may be using the same function with a different syntax, such as VLOOKUP(search_key; range; index; [is_sorted]), where the semicolon acts as the argument separator.

The usage of these formula delimiters depends on your Sheets’ locale, accessible in the File menu > Settings.

If you’re from a region different than mine, like any EU country such as France, Germany, Spain, etc., copying a formula from my tutorials might result in a formula parse error on your sheet because I have set the UK as the locale.

To resolve this issue, you can follow one of two steps:

  • Change your Sheet’s locale to the UK, insert my formula, and then revert the locale back to yours.
  • Adjust the formula by changing the comma separator (formula delimiter) to a semicolon.

This post guides you on how to modify a non-regional Google Sheets formula to match your locale, offering insights into adapting Google Sheets formulas for locale-specific formatting.

How Google Sheets Language and Locale Settings Impact Formulas

Two crucial settings influence formulas in Google Sheets: ‘Language’ and ‘Locale.’

The former pertains to language, while the latter is associated with date, currency, and number formatting.

The challenge arises within the ‘Locale’ settings. In certain countries, a comma serves as the standard decimal separator (e.g., €6,00) instead of a period. Consequently, using a comma as the argument separator in formulas can lead to issues; therefore, you must use the semicolon as the argument separator.

Upon accessing shared Google Sheets from a different locale, you may notice changes in the formula, such as the use of a comma instead of a semicolon or vice versa.

If sharing settings permit, making a copy of the sheet allows you to use it without complications since the sheet’s locale remains unchanged.

This ensures that existing formulas continue to function smoothly. However, when you copy-paste a formula from a sheet set to a different locale, it might not work if Google Sheets fails to correct it automatically.

Adapting a Non-Regional Google Sheets Formula to Your Locale

In the first example, the locale is set to the UK, where a comma serves as the argument separator.

Here are examples of using two popular functions: COUNTIF and VLOOKUP.

=COUNTIF(A2:A, "Apple")
=VLOOKUP("C", E2:F5, 2, 0)
Changing a Non-Regional Google Sheets Formula to Your Locale

In another sheet, the locale is set to Spain.

Here are the same COUNTIF and VLOOKUP formulas with the function argument separators modified from comma to semicolon.

=COUNTIF(A2:A; "Apple")
=VLOOKUP("C"; E2:F5; 2; 0)

Observe how the formula separator changes in each locale.

Locale Settings and the QUERY Function

When using the QUERY function, errors may occur when transitioning a non-regional Google Sheets formula to your locale.

To illustrate, examine the QUERY syntax in two different locales:

QUERY(data, query, [headers])
QUERY(data; query; [headers])

The argument separators are, of course, the comma or semicolon. However, the column ID separators must be a comma, not a semicolon. When using native functions within the query string, they should follow the comma/semicolon settings.

Let’s consider two examples:

=QUERY(A1:D, "select A, sum(C), B where A is not null group by A, B", 1)
=QUERY(A1:D; "select A, sum(C), B where A is not null group by A, B"; 1)

In these two QUERY formulas, the first one has the locale set to UK, and the second one has the locale set to Spain. The argument separators are a comma or semicolon, depending on the locale, but within the query string, the column identifiers are separated by a comma in both.

Now, observe two more formulas:

=QUERY(A1:D, "select A, B where D=date '"&TEXT(D2, "yyyy-mm-dd")&"' ", 1)
=QUERY(A1:D; "select A, B where D=date '"&TEXT(D2; "yyyy-mm-dd")&"' "; 1)

The difference lies in the worksheet function used within the query string. They should follow the locale setting.

How Locale Settings Impact Separators in Array Creation

You can effortlessly create arrays in Google Sheets by enclosing a set of values within curly braces.

In UK locale settings, use a comma separator to create an array by row (HSTACK) and a semicolon to create an array by column (VSTACK).

Example for Array By Row:

={B2:C4, E2:F4}

Example for Array By Column:

={B2:C4; E2:F4}
Locale Settings and Its Impact on Array Creation in Google Sheets

In the case of Spain, the comma should be replaced by a backslash. No changes to the semicolon.

Example for Array By Row:

={B2:C4\ E2:F4}

Example for Array By Column:

={B2:C4; E2:F4}

Conclusion

In summary, here are the key takeaways from this tutorial:

  1. When converting a non-regional Google Sheets formula to your locale:
    • Replace argument separators from a comma to a semicolon or vice versa.
  2. In the QUERY function, the separators (column identifier separators) within the query string must be a comma.
  3. In the QUERY function, any formula used within the query string must follow point #1 above.
  4. When creating arrays, a comma must be replaced by a backslash or vice versa.
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.

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

SUMPRODUCT Differences: Excel vs. Google Sheets

The core purpose of the SUMPRODUCT function remains consistent across both Excel and Google...

Sum Values by Month and Category in Excel

With the help of EOMONTH, UNIQUE, and SUMIFS functions in Excel, you can efficiently...

Sum Values by Categories in Excel

In Excel, the easiest way to sum values in a range by categories is...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

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.