Average entire column

To average all values in a single column you can apply an Excel or a VBA method using the Excel AVERAGE function

Example: Average entire column

Average entire column

METHOD 1. Average entire column

EXCEL

=AVERAGE(C:C)
The formula uses the Excel AVERAGE function to average all of the numbers in column C.

METHOD 1. Average entire column using VBA

VBA

Sub Average_entire_column()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'apply the formula to average all numbers in column C
ws.Range("E5") = Application.WorksheetFunction.Average(ws.Range("C:C"))

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named Analysis.
Data Range: Ensure that the data that you want to average from is captured in range ("C:C") in the Analysis worksheet.

ADJUSTABLE PARAMETERS
Date Range: Select the column that you want to average by changing range ("C:C") to any range in the worksheet, that doesn't conflict with the formula.
Output Range: Select the output range by changing the cell reference ("E5") to any cell in the worksheet, that doesn't conflict with the formula.

Explanation about the formula used to average entire column

EXPLANATION

EXPLANATION
To average all values in a single column you can apply an Excel or a VBA method. The formula used to average values in an entire column is driven by an Excel AVERAGE function.
In both the VBA and Excel examples the formula averages all of the numbers in column C. This is achieved through the use of the Excel AVERAGE function.
FORMULA
=AVERAGE(column_reference)
ARGUMENTS
column_reference: The column which you want to average.