This well-known Microsoft program allows you to create and execute countless projects related to various occupations. It’s also widely used by students, both at the high school and university levels. It’s possible to create a clock in this software, whether digital or analog . To do so, you need to follow certain instructions, which we’ll explain later.
Index( )
- How do you make a digital clock able to update every second?
- What are the functions necessary to structure our clock?
- How is the course that the needles should follow determined?
- Angles of origin
- Inclination of the ends on the circumference
- Divisions of the circle
- How to make the graph and link the known information?
How do you make a digital clock able to update every second?
First of all, you need to understand that to create your own analog clock with permanently moving hands, you must first properly configure a digital clock in the Excel document based on real-time data . The process doesn’t take long and is definitely something people should be familiar with.
In the document, click on any cell and type the command ‘=now()’ to display the current date. The numbers will remain static, however, so organize three boxes : one for the hour, another for the minutes, and the last for the seconds. For the first, enter ‘=hour()’; inside the parentheses, enter the cell location where the full time is located. Do the same for the minutes ‘=minute()’ and the seconds ‘=second()’.
In two other cells, type the ‘:’ symbol once, add the new five values to a new cell, selecting each one with the cursor . It should look like this: ‘=hour:minute:second’. Click the Developer tab, or View for newer versions of Excel, select the Macros option, enter a name in the pop-up box, and click Create.
In the new window, type ‘Range (”CeldaFechaInicial”).formula = ”now()”’ in the second line. Press Enter and in the next line enter the text ‘Application.OnTime Now+TimeValue(”00:00:01”), ”PlaceName” and press Enter, make sure you enter the correct information inside the parentheses . Click on ‘ThisWorkBook’ on the left side, select the option with the same name in the drop-down bar at the top. In the second line type ‘CallPlaceName’ and press Save.
What are the functions necessary to structure our clock?
To create an analog clock, you must use a series of functions in the same Excel document where you program the digital clock. For example, it’s a good idea to use commands to combine boxes, color, or position text.
It will also be necessary to formulate equations to determine the angles formed by each number located along the circumference of the wall clocks, and to calculate the XY coordinates at the origin, relative to a common point such as the center of the circle, and at the ends. It is possible to estimate work schedules using Excel.
How is the course that the needles should follow determined?
The analog clock displays numbers from 1 to 12, to get the hands to move clockwise , it is advisable to create a table in Excel where each number is assigned the angle that corresponds to it with respect to the position that 12 would normally occupy.
To make them move clockwise as well, enter the position data for the extremes in a Scatter chart , click on the chart and press the Select Data option, enter the data corresponding to the X axis box in a new entry and the data for the Y axis in another box, finally press OK.
Angles of origin
It is important to establish the appropriate equations involving the angles formed by the hands. Several aspects are taken into account for counting . The point of origin will always be halfway around the circle, and the position of the hands is determined from the vertical line at 12 o’clock.
To locate the hours, simply add 30 degrees clockwise, thus, number 1 is assigned the value of 30 degrees, number 2, 60 degrees and so on up to 12. The necessary formulas are detailed below.
Inclination of the ends on the circumference
Each hand is assigned a value at the end, so that it defines its positions on both the X and Y axes. Formulas must be created for each hour; in the case of the origin, the angle is zero, so for X the equation is ‘=SIN(RADIAN())’ and for Y, it would be ‘=CON(RADIAN())’. The angle for each hour must be inside the parentheses.
Divisions of the circle
One way to know the number of fractions of the circumference is based on the number of numbers corresponding to the hours. Since there are 12, the figure is divided by the same number every 30 degrees, until reaching 360 degrees in one turn.
How to make the graph and link the known information?
To start , write the current time in a cell or use the previously configured digital clock, separate the components in each separate box, determine the angle of each one, in another place place a row for Origin and another for Extremes, below each one go two more rows for X and for Y, with the equations that include sine and cosine.
In a cell, write the division by 30 degrees, below it in each box write a number from 1 to 12, next to it the corresponding angle from 30 to 360. Just as before, write rows for the origin and end, and perform the calculations as well. Insert the Scatter chart with Smoothed Lines and Markers , on the Design tab, press Select Data . Make sure you know the correct way to concatenate dates and times with the custom format .
Click Add, in X Values enter the source and extreme values both in X of the Hour row of the first table, in Y Values do the same, both in Y, and click OK. Press Add and repeat the process for Minutes and Seconds. Right-click on the chart, click Select Data, enter the extreme data for the hours (1 to 12) from the second table so that they appear in the chart.