The direct answer: Google Sheets does not have a dedicated CONCATENATE function inside QUERY, but you can join columns by combining the & operator or the CONCAT() function within the SELECT clause, then wrapping the result in LABEL to rename it. For example, =QUERY(A1:C10, "SELECT A & ' ' & B LABEL A & ' ' & B 'Full Name'") joins columns A and B with a space between them.
Why You Can’t Use CONCATENATE Directly
The QUERY function uses the Google Visualization API Query Language, which is a separate language from Google Sheets’ own function set. It understands a limited set of scalar functions like upper(), lower(), year(), and arithmetic operators, but it does not recognize CONCATENATE, TEXTJOIN, or JOIN as valid commands. If you type =QUERY(A1:C10, "SELECT CONCATENATE(A,B)"), you’ll get a #VALUE! error because the query parser doesn’t know that function name.
Instead, the query language supports the ampersand (&) as a string concatenation operator, just like in standard spreadsheet formulas. You can also use the CONCAT() function, but it only takes exactly two arguments, so for three or more columns you’d need to nest it: CONCAT(CONCAT(A,B),C). The ampersand approach is almost always cleaner and more flexible.
Basic Concatenation with & in SELECT
To join two columns, write a QUERY like this. Assume you have first names in column A (rows 2–10) and last names in column B (rows 2–10). In cell E1, enter:
=QUERY(A2:B10, "SELECT A & ' ' & B LABEL A & ' ' & B 'Full Name'")
This returns a single column where each row shows the first name, a space, then the last name. The LABEL clause renames the computed column header from the raw expression to “Full Name”. Without LABEL, the header would show the literal expression A & ' ' & B, which is ugly.
You can also use a comma as a separator: SELECT A & ', ' & B. Or no separator: SELECT A & B. The ampersand works with any number of columns, so SELECT A & ' - ' & B & ' (' & C & ')' would produce something like John - Smith (active).
Concatenating with Static Text and Numeric Values
Sometimes you need to add a label or a prefix. For instance, if column A contains product codes and you want to display “Item: ” before each code, use:
=QUERY(A2:A10, "SELECT 'Item: ' & A LABEL 'Item: ' & A 'Product'" )
When concatenating numbers, the query language automatically converts them to text in the result. If you have a numeric column B (like prices) and you want to show “$” before each value, write SELECT '$' & B. But be careful: this converts the number to text, so you lose the ability to do arithmetic on that column later. If you need both the original number and a formatted text version, select both columns: SELECT B, '$' & B.
Using WHERE with Concatenated Columns
A common need is to filter rows based on a concatenated value. For example, you have first and last names in separate columns, and you want to find rows where the full name equals “John Smith”. You can use the concatenation inside the WHERE clause:
=QUERY(A2:B10, "WHERE A & ' ' & B = 'John Smith'")
This works because the query evaluates the concatenation first, then compares it to the string. You can also use it with CONTAINS: WHERE A & ' ' & B CONTAINS 'Smith'. Note that string comparisons in the query language are case-sensitive by default, so ‘smith’ won’t match ‘Smith’.
Alternatives: ARRAYFORMULA and TEXTJOIN
If QUERY’s concatenation feels limited, you don’t have to use it. A simpler approach for many cases is to use ARRAYFORMULA with the ampersand outside of QUERY:
=ARRAYFORMULA(A2:A10 & " " & B2:B10)
This fills a column with concatenated values and works exactly like the QUERY version but without the LABEL hassle. For more complex joins with a delimiter and ignoring blanks, use TEXTJOIN with ARRAYFORMULA? Actually, TEXTJOIN is for combining multiple cells into one string, not for row-by-row concatenation. For row-by-row, ARRAYFORMULA with & is the standard.
Another alternative is to use a helper column: put =A2 & " " & B2 in column C, drag down, then run QUERY on the range A2:C10. This keeps the QUERY simple and readable, and you can still filter on the helper column. The downside is an extra column in your sheet, but it’s often worth it for clarity.
Common Errors and How to Fix Them
- #VALUE! error with CONCATENATE: You used the spreadsheet function inside QUERY. Replace it with
&orCONCAT(). - Header shows the raw expression: Add a LABEL clause with a friendly name.
- Spaces disappearing: In the query string, you must wrap spaces in single quotes.
SELECT A & Bgives no space;SELECT A & ' ' & Bgives one space. - Numbers become text: That’s expected. If you need to sort numerically, sort before concatenating, or keep the original column.
- Concatenating with a date: Dates in QUERY are stored as serial numbers. To format a date, use
TEXT(A, 'yyyy-mm-dd')inside the query? Actually, the query language doesn’t have TEXT(). Instead, format the date column in the sheet first, or useFORMATclause:SELECT A, B FORMAT A 'yyyy-mm-dd'but that only works for displaying, not concatenating. For concatenating a date, convert it to text in a helper column with=TEXT(A2, "yyyy-mm-dd").
Frequently Asked Questions
Can I use CONCATENATE inside QUERY?
No. The QUERY language does not support the CONCATENATE function. Use the ampersand (&) operator instead, which does the same thing. For example, SELECT A & B joins the values of columns A and B.
How do I add a space between concatenated columns in QUERY?
Include a string literal with a space between the ampersands: SELECT A & ' ' & B. The single quotes are required; without them, the query parser will try to interpret the space as part of the column name and fail.
Why does my concatenated column show a weird header?
Because the default header is the full expression you wrote. Add a LABEL clause to rename it: SELECT A & ' ' & B LABEL A & ' ' & B 'Full Name'. The LABEL clause takes the exact expression you want to rename, then the new name in single quotes.
Can I concatenate more than two columns in QUERY?
Yes, chain ampersands: SELECT A & ' ' & B & ' ' & C. There’s no practical limit to the number of columns you can join this way. For very many columns, consider using a helper column with ARRAYFORMULA to keep the query readable.
Does concatenation in QUERY work with numbers and dates?
Numbers work fine—they’re converted to text automatically. Dates are trickier because they’re stored as serial numbers. To show a readable date, format the date column in the sheet first (e.g., Format > Number > Date), then concatenate. Or use a helper column with =TEXT(A2, "mm/dd/yyyy").
Is there a way to join columns with a comma and space in QUERY?
Yes, just include the comma and space in the string literal: SELECT A & ', ' & B. This produces values like “John, Smith”. Remember to use single quotes around the comma-space sequence.
Practical Example: Full Name and Email
Suppose you have a sheet with first name (A), last name (B), and email (C). You want a QUERY that returns a single column with “Last, First
=QUERY(A2:C10, "SELECT B & ', ' & A & ' <' & C & '>' LABEL B & ', ' & A & ' <' & C & '>' 'Contact'")
For a row with A=”Jane”, B=”Doe”, C=”jane@example.com”, the result is Doe, Jane . The LABEL clause renames the header to “Contact”. This works because the ampersand concatenates all parts, including the literal angle brackets and the email column.
If you want to filter this to only show contacts with a specific domain, add WHERE: WHERE C CONTAINS '@company.com'. The concatenation in SELECT doesn’t affect the WHERE clause on the original column C.
Related
- Shortcut to Switch Off Computer: Fastest Ways
- Generate Random Number in Unity: C# Script Guide
- Free Data Entry Software for Windows 10: 7 Real Options
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Does Excel Save Automatically? AutoSave ExplainedYes, Excel can save changes automatically, but whether it does depends mainly on where the workbook is stored.…
- How to Add a Bottom Header in Microsoft Word EasilyTo put text at the bottom of a page in Word, add a footer: choose Insert > Footer,…
- Excel Application Not Responding: Causes and FixesIf Excel says “Not Responding,” first give it a few minutes if you just opened a large file,…
- Excel Color Scales: How Conditional Formatting WorksIn Excel for Microsoft 365 on Windows, color scale conditional formatting shades cells according to their numeric values,…
- Excel 3-Digit Number Format: Show Leading ZerosTo display numbers as three digits in Excel, apply the custom number format 000: select the cells, press…
- Home Clean List Excel: Build a Practical ChecklistYes—an Excel home clean list is a practical way to organize chores by room, frequency, and status. In…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.