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.
In the below example, I have used columns function to get the number of columns from range A1:F1.
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.
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.