HomeGoogle DocsSpreadsheetUsage of Google Sheets CELL Function and Examples

Usage of Google Sheets CELL Function and Examples

Published on

Google Sheets CELL function is related to gathering limited information about any Cell in a Spreadsheet. But don’t undermine this function as it can be a useful tool on certain occasions. In this new Google Sheets tutorial, you can learn what are those information Google Sheets CELL function can return.

To use CELL Function in Google Sheets, first, you should know about information type called “info_type”.

How to USE CELL Function in Google Sheets

I’ve already mentioned about the purpose of CELL function above. Now see the syntax.

CELL(info_type, reference)

In this syntax, “reference” is the cell reference of which you want to get the information. Now see detailed information about “info_type” after one example.

=CELL("COL",G2)

This Google Sheets CELL formula would return the result 7 which is the Column Number of G. Here “COL” is the “info_type” to return Column number. You can see below all the available info types in CELL function.

Google Sheets CELL Function “Info Types” and Examples

I’ve detailed available info types in different sections like Part I, Part II etc. So I hope, you can easily grasp the usage of this formula.

Google Sheets Cell Function Info Type Part I:

=CELL("address",A1)

Result: $A$1

Note: returns an absolute cell reference (it’s all about placing the dollar symbol) in text form.

=CELL("col",A1)

Result: 1

Note: Returns the column number of A1.

=CELL("row",A1)

Result: 1

Note: Returns the row number of A1.

Google Sheets Cell Function Info Type Part II:

=CELL("contents",A1)

Note: Returns the cell content in A1 as it is. If cell A1 contains the value 10, the formula would return the value 10. That means the formula is equal to =A1.

Google Sheets Cell Function Info Type Part III:

=CELL("type",A1)

Note: This formula returns the letter B for Blank, L for Label or Plain Text and V for Value

Example of Cell function in Google Sheets When info_type is “type”

Suppose the cell value in A1 is the text “Info Inspired”. The function would return the letter “L”. This you can use in an IF logical test as below.

Google Sheets CELL Formula in Logical Test

=if(cell("type",A1)="V",A1*2)

This IF formula would check the cell A1 and if A1 contains a number, it would multiply the number with 2. The following formula using ISNUMBER is equal to the above.

=if(ISNUMBER(A1),A1*2)

In both cases, if the value in A1 is text, the formula would return FALSE. But I suggest you use the second formula as you can use this in an array hassle free. When you use the first formula with an array, it would return “#VALUE!” error if any cell contains the text value.

Cell formula in IF logical test in Google Sheets

Google Sheets Cell Function Info Type Part IV:

Formula: CELL("prefix",A1)

Here you can see that I’ve used “prefix” which is another CELL formula info_type. It merely returns the horizontal cell alignment info. It returns a single quote for left-aligned text, double quotes for right aligned text, carat for centered text and empty for everything else.

get text alignment info in Google Sheets

Google Sheets Cell Function Info Type Part V:

Formula: CELL("width",A1)

By using width information type in Cell formula, you can find how many characters can perfectly fit into a cell.

Conclusion

The above are the currently available info_type in Google Sheets CELL function. You can see that sometimes the results wrongly appear when using this function. If any of the above info types may return blank or wrong output, you can double click on the cell where you applied the formula to see the actual cell info. That’s all. Enjoy.

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.

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

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...

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.