In today's post, we shall learn to make animated charts in Microsoft Excel.
Earlier i created post to create animated charts in Tableau which were quit easier than excel. If you want to have a look at that post, please click on the below link.
https://dailypro123.blogspot.com/2020/03/animated-bar-chart.html
In Microsoft Excel, we shall use VBA code to give animation affect to charts.
I have used a spin button to change the months. In case you don't know how to add the spin button, just click on the Developer tab>insert and select the spin button.
I have stored the data in "Base_Data" worksheet in the below format.
To create charts, data is sorted by VBA code in the below format in another worksheet; named "calculations".
Here comes now the tricky part. On the spin button, add the below VBA code which is actually looking up the related figures form the Base_Data worksheet and placing in the calculation sheet in a period of time.
VBA CODE
VBA CODE TEXT
Sub Spinner6_Change()
Dim i As Single
Dim Month As Integer
Dim SalesPerson As Integer
Dim SalesValue As Single
Sheets("Calculations").Range("B2:B9").ClearContents
Month = Sheets("Dashboard").Range("v1").Value
For SalesPerson = 1 To 8
SalesValue = Sheets("Base_Data").Range("B4:M11").Cells(SalesPerson, Month).Value
For i = 1 To SalesValue Step 225
Sheets("Calculations").Range("B2:B9").Cells(SalesPerson) = i
DoEvents
Next i
Next SalesPerson
End Sub
You may change the step values to increase or decrease the speed of animation.
---------------------------
Hi please share on below email id
ReplyDeletepaulo.henrique56@aol.com
Hi....Shared now! In case of having questions, pls let me know...
DeletePLEASE SHARE ON THE EMAIL BELOW:
Deletepsmpf@hotmail.com
thank you so much
Done..Cheers!
Delete
DeletePls share a copy to me too :) laykoon.tan.sg@gmail.com