How to use “COLUMNS” function in Excel

Complete Excel VBA Course

COLUMNS function is used to get the total count of columns in an array or in cells range for excel worksheet.  COLUMNS Function has only one argument i.e. array

Syntax Description:

array argument is used to give the cell range for which total count of columns are required.

Example 1: Exploring “COLUMNS” function with examples

Here we have some examples, where “Column A to Column C” has a database, “Column D” shows the sample formula, “Column E” shows the output of the function and Explanation is provided in Column “F”.

Complete Excel VBA Course

We will be using COLUMNS function as follows:

COLUMNS function
Things to Remember:

– If a single cell reference is given instead of cell range/array in array argument, then function output will be 1

– If cell reference is not correctly provided in the function, then it will give output as an error.

– Function should give output in “General” format, however if output is not as per the desired format then we need to change the cell format to “GENERAL”

Don’t forget to leave your valuable comments!

Recommended Articles

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *