Microsoft Office Tutorials and References
In Depth Information
Figure 17-19: This fully functional clock is actually an XY chart in disguise.
The chart uses four data series: one for the hour hand, one for the minute hand, one for the
second hand, and one for the numbers. The last data series draws a circle with 12 points (but no
line). The numbers consist of manually entered data labels. In addition, I added an oval shape on
top of the chart.
The formulas listed in Table 17-2 use basic trigonometry to calculate the data series for the clock
hands. (The range G4:L4 contains zero values, not formulas.)
Table 17-2: Formulas Used to Generate a Clock Chart
Origin of hour
End of hour hand =0.5*COS((HOUR(NOW())+(MINUTE(NOW())/60))*(2*PI()/12))
Origin of minute
End of minute
Origin of second
End of second
This workbook uses a simple VBA procedure that schedules an event every second, which causes
the clock to run.