Getting Average of a Table Column

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
975
I need to find and assign the average of a specific column within a table called "Sum7EditsTable" so I can then pass that into a text box.

I have the following formula, which is a copycat of some other calculations I am doing to generate a graph, but for some reason this just returns a blank value.

How do I get the average of a table column using the header as opposed to doing a full-on rows.count formula to get the last cell, etc.?

VBA Code:
ActiveWorkbook.Names.Add Name:="sAverage", RefersToR1C1:="=AVERAGE(Sum7EditsTable[[#All],[Percent Edit]])"
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Clarification: right now the formula above simply adds that range as a chart element.

I want to use a similar method (calling the table column by name) to get the average of that column so I can include in a text box, msgbox, etc.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top