moving average

nhoe1957

New Member
Joined
Aug 8, 2010
Messages
13
Hi
I'm new here

Thanks for the help

I know how to do the normal moving average.

But I am interested in only having the last moving average shown.

example below, I want let's say the last 5 day's MA to display in the XXXXX
and as I add data, 7-20, 7-23, 7-24, etc. that the MA XXXXX automatically updates in that cell ONLY. I am not interested in viewing the past MAs. Only for the most current data.

MOVING AVERAGE
XXXXX

data set

date $

7-10 100
7-11 20
7-12 50
7-13 -20
7-14 250
7-17 -100
7-18 50
7-19 65
 
AlphaFrog

everything works fine.

Now new parameter

If the data set for the moving average is negative, it won't calculate and error #num! message.

test.jpg


as you can see if the 5 day MA is less than zero, the formula breaks
The 5 day MA should be -281.20.

It is possible for the data for the past 5 days or 5 inputs to be cause the moving Average to be a negative. Is there a way to solve it?

thanks
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

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