'Moving' chart in Excel

Do you see a motion chart in Excel? With a simple, self-created Viual Basic program, you can make your chart move to look lively. Suppose, you have a data table with column A containing the variable X (from A4: A19).

Do you see a motion chart in Excel?With a simple, self-created Viual Basic program, you can make your chart move to look lively.Suppose, you have a data table with column A containing the variable X (from A4: A19).

'Moving' chart in Excel Picture 1'Moving' chart in Excel Picture 1

The value of the following variable X always equals the value of the variable X before it plus the value specified in cell A1.You give the initial value of variable X to 0 (cell A4), the formula for cell A5 = A4 + $ A $ 1.Next you select a range (in this case, A5: A19) and press Ctrl + D to copy the formula from cell A5 to the remaining cells.Column B contains the function value Y = SIN (X).Then go to Insert Chart to chart the value area you created.(You should use Chart Type as XY Scatter).

'Moving' chart in Excel Picture 2'Moving' chart in Excel Picture 2

In order for your chart to move, you must write a function to change the value of cell A1.Then the value of the data sheet will change and make the chart change as well.Press Alt + F11 to display the Visual Basic Editor window.In the Visual Basic window, press F7 to bring up the Code window.Write a function like this:

Sub BieuDoDongDay ()
Range ('A1') = 0
For i = 1 to 150
Range ('A1') = Range ('A1') + 0.035
Next i
Range ('A1') = 0
End Sub

Back in Excel's window, press Alt + F8 to open the Macro window, then click Run to execute the program.You can set shortcuts for newly created functions by pressing Options.That's it, you can admire your work already.

'Moving' chart in Excel Picture 3'Moving' chart in Excel Picture 3

TRAN MINH TUNG (Tan Binh, Ho Chi Minh City) - According to Echip

4 ★ | 1 Vote