Find last used cell and return cell address formula

tims31

New Member
Joined
Jul 3, 2014
Messages
38
I have a sheet which has data in a column but the length of the column range can change so I need a formula that will find the cell address of the last used cell in that column and be able to insert it so it can be used in the AVERAGE forumla =AVERAGE(E13:E[last cell used address]) The columns starts at row 13 and has only numeric values. How would this be inserted into the average formula?

Is this possible in a formula and not using VBA please?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hey Chris, Thanks for the prompt reply.

I tried that but all I get is a zero value from the result...any ideas please?
 
Upvote 0
Go through the formula with "Evaluate Formula" on the Formulas tab and see if you can see where it's going wrong.

Does column E contain only the values you want to average? No headings or anything?
 
Upvote 0
how about

=AVERAGE(INDIRECT("E13:E"&COUNT(E:E))</pre>
 
Upvote 0
Go through the formula with "Evaluate Formula" on the Formulas tab and see if you can see where it's going wrong.

Does column E contain only the values you want to average? No headings or anything?

Chris,

The column has the results above in rows 2 to 8 and row 12 has a header, the numerical values are all below starting from row 13. I used the evaluate formula but dont really understand the output from this. It says that a function in the formula causes the results to change every time the sheet is calulated

=AVERAGE(INDIRECT("E13:E"&COUNT(E:E)+12))

If I continue to evaluate I get the average of E13:E42 which when evaluating gives zero but if I do this separatly in a different cell just as average E13:E42 I get the result. Also E42 is not the cell with the last content in E36 is?
 
Upvote 0
Please see the image below which shows the layout. I need the formula to go in cell E3 which as you can see shows zero as the value, hope that explains it better

3Capture.PNG
 
Upvote 0
Code:
=AVERAGE(INDIRECT("E13:E"&COUNTA(E:E)-7+12))
The -7 takes the other 7 non-empty cells out of the count.

Hope this helps,

Chris.
 
Upvote 0
Try:
=AVERAGE(E13:INDEX(E:E,match(1E100,E:E)))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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