Add Field Label to Array Formula Result in Google Sheets

In Query, there is an option (clause) to name or rename field labels (column names). I think no other functions have that cool feature. But it’s easy to add field label to array formula result in Google Sheets.

In the below examples, you can see how to add field labels aka column names to single as well as multiple column array outputs.

Some times you may also want to add a label to a single cell formula output to plot a chart. So that part also I will include in this tutorial.

Must Read: Column Heading | Column Label | Column Name | Field | Field Label in Google Sheets.

Adding Field Label to a Single Cell Formula Output (Non-Array Formula Output)

To add field labels you must use the Curly Braces. I think instead of giving you more details, the best way is showing you a screenshot.

Formula # 1:

={"Salary";B2:B10*C2:C10}
Adding Column Label to a Single Cell Formula Result

Normally to get the salary of the employee “Alex”, you can use the formula B2*C2 in cell D2.

Here I want to add the column name “Salary” to that output. The formula added in cell D1 does that correctly.

See how I have used the Curly Braces. The column name is within double quotes as it’s a string and put a semi-column between the formula and the column name.

Using the semi-colon may not work if you are from any of the EU countries. Check the following tutorial for more info on this – How to Change a Non-Regional Google Sheets Formula.

Finally, the formula is wrapped by the Curly Braces. This is what you want to follow with array formula outputs too.

Adding Field Label to Single Column Array Formula Result in Google Sheets

Several functions in Google Sheets can return a single column output. A few of them are ArrayFormula, Filter, Sort, and Sortn. Here also, you can follow the above same method to add a column name to the first row.

Here are two examples. One with ArrayFormula and another with the function Filter.

How to Add Column Name to a Single Column ArrayFormula Output

I am adding more rows to the data used in the earlier formula example. See that data and the formula first.

Formula # 2:

=ArrayFormula({"Salary";B2:B*C2:C})
Add Field Label to the First Row of a Single Column ArrayFormula

The formula is almost the same as Formula # 1. The only difference is the inclusion of ArrayFormula and the infinite column ranges.

The formula returns additional values in row # 11, 12 and 13. To omit that simply modify the formula # 2 as below.

=ArrayFormula(if(A1:A<>"",{"Salary";B2:B*C2:C},))

How to Add Field Label/Column Name to Filter Output

Assume you want to extract the name of the employees whose basic salary is 4500. Here you can use the Filter function.

Here I am adding column name to the filter formula output.

Formula # 3:

={"Name";filter(A1:A,B1:B=5500)}
Get Column Name in Filter Function in Sheets

I have added the column name “Name” to the top row of the Filter formula result.

Finally, I am going to use the above formula to return a four column output. I mean the Name, Basic, Present Days and Salary of employees whose basic pay is 4500.

Adding Column Name to Multiple Column Output in Google Sheets

Formula # 4:

={"Name","Basic","Present Days","Salary";filter(A1:D,B1:B=5500)}
Add Field Label to a Multi-Column Array Formula Result

Interestingly you can use corresponding cell references in the above formulas to add field labels. As an example, you can replace the last formula with the following formula.

={A1:D1;filter(A1:D,B1:B=5500)}

That’s all for now. Hope you have enjoyed the stay!

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.