August 2, 2021

# COLUMNS function in Excel

In this lesson we will learn how the COLUMNS function works in Excel. We use COLUMNS function to count the number of columns in a table.

`=COLUMNS(table)`
• Table : We need to provide the table as an argument for which the number of columns need to be counted

In below example we have used the below formula in cell H6 to count the number of columns in table C5:F12.

`=COLUMNS(C5:F12)` ##### Note :
• You might be thinking that getting the number of columns in a table is easy. Without using the COLUMNS function it can be done by just selecting the first cell to last cell of a single row of the table and number of columns will be displayed in the status bar. But remember, that feature won’t consider the blank cells. That will actually count the number of non-blank cells only.
• But using COLUMNS function, the actual number of columns in the specified table can be retrieved even if there is one or all blank cells present in any column(as in our example).
• The COLUMNS function can be useful in the scenario where the table doesn’t start from the first column of the Excel(as in our example) and we need to get the number of columns as part of any formula with the table.

You can also check here to understand how the COLUMNS function works in Google Sheet.

You can also check here to understand how the ROWS function works in Excel.

You can also check here to understand how the ROWS function works in Google Sheet.

You can also check here to understand how the COLUMN function works in Excel.

You can also check here to understand how the COLUMN function works in Google Sheet.

You can also check here to understand how the ROW function works in Excel.

You can also check here to understand how the ROW function works in Google Sheet. #### abhraisraja

View all posts by abhraisraja →