How to use Excel COLUMNS Function

    how to use excel columns function

    Quick Intro

    Use Excel COLUMNS Function to get the number of columns include in a reference or array. In simple words, you can get the number of columns which are included in the reference.

    For example for reference A1:D1 if will return 4, as a result, because you have 4 columns in that reference A, B, C and D.



    • array An array or range get from which you want to get the number of columns.

    More Information on Excel COLUMNS Function

    • You can also use named range in columns function.
    • Columns function is not concerned with the values in the cells, it will simply return the number of columns in a reference.


    In the below example, I have used columns function to get the number of columns from range A1:F1.

    Get Column Numbers With Excel COLUMNS Function

    In the below example, I have used columns function to create serial numbers in headers. I have used fixed cell reference for the first cell in the range and drag it to the left.

    Create Header Serial Number With Excel COLUMNS Function

    Sample File

    download sample file to learn more about this tips

    What’s Next?

    To learn more about Excel AVERAGE Function you can check Microsoft’s Help Section. And, if you have a unique idea to use it, I would love to hear from you.

    There is also you have AVERAGEA function which is highly useful. Apart from this, I have a list of excel functions and some real life formulas examples.