Formula to average last 3 values in a row, while ignoring blank cells?

mdean32

New Member
Joined
Jan 15, 2019
Messages
22
[TABLE="width: 500"]
[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD]41[/TD]
[TD]37[/TD]
[TD]69[/TD]
[TD]46[/TD]
[TD][/TD]
[TD]32[/TD]
[TD][/TD]
[TD]40[/TD]
[TD]33[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[/TABLE]

What formula could I use to average the last 3 values of row A1 through J1 while ignoring the blank cells? This would have new data entered daily, so the row with be ongoing, let's say A1:YA4. As new data is entered, I always want the formula to calculate the last 3 values entered. I appreciate any help you might give
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi,

In order to get the average of the last 3 columns with a numeric entry ...

You can test following Array Formula :

Code:
=AVERAGE(LOOKUP(LARGE(IF(ISNUMBER(A1:YA1),COLUMN(A1:YA1)),{1,2,3}), COLUMN(A1:YA1), A1:YA1))

Hope this will help
 
Upvote 0
Thank you, and this does help, however if I extend the range to A1:YA1, it gives me a zero. It will only calculate the last 3 values if I have my range A1:(last cell with data). In my above example it would be A1:J1. Is there a work around for this? Example, K1 through YA1 cells may be blank at the time, but over time will have some data. Thanks again
 
Upvote 0
Hi again,

Not sure to understand your constraints .... should you go beyond column YA ...

To handle all potential situations ... you could use A1:XFD1

HTH
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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