How to Write a Function in Google Sheets

A function in Google Sheets (or other spreadsheet programs like Microsoft Excel) has three parts, in this order:

How to Write a CONCATENATE Function

CONCATENATE follows the format above, but it has some specific features. The general layout is: =CONCATENATE(string 1, [string2, … ]) The strings refer to specific data in the spreadsheet. These strings can be individual cells or ranges of cells, like entire rows or columns. The rules for a valid function are that you present at least one data point (or argument), and each point or range is separated with a comma. A valid CONCATENATE function may look like this: =CONCATENATE(A1,B2:B5,A2) When Sheets runs the function, the result displays every entry in the cells the formula mentions arranged in order.

How to Add Spaces to a CONCATENATE Function

Concatenation doesn’t leave a blank space between words. However, you can build spaces into the formula. Wherever you want a space, insert a set of double quotation marks with a space between the quotation marks. The sample function above, with a space between the first two strings, would look like this: =CONCATENATE(A1," “,B2:B5,A2)

Limits to Concatenating Numbers

Google Sheets formats the result of a CONCATENATE function as text. If your entries are text, this doesn’t affect anything. But, if you use numbers, you can’t include the result in math functions such as SUM and AVERAGE. That’s because math functions ignore the text.

How to Enter the CONCATENATE Function

Google Sheets doesn’t use dialog boxes like Excel’s to enter the function arguments. Instead, it has an auto-suggest box that appears as you type the name of the function into a cell. You can also access CONCATENATE through the Function button next to the text box on iOS or in the upper-right corner of the screen on the desktop. The mobile version looks like the letters fx, and the desktop version looks like the Greek letter sigma (∑). CONCATENATE is under the Text heading in the Function menu.