How to Create an Analog Clock in Excel (with Easy Steps)

 

Step 1: Setting up Hours, Minutes, and Seconds

  • Click on cell C5 and enter the following formula:

=IF((HOUR(NOW())+C10/60+C15/3600)>12,(HOUR(NOW())+C10/60+C15/3600)-12,HOUR(NOW())+C10/60+C15/3600)

  • Press Enter.
  • As a result, we will get the value that will control the hours on the clock.

  • Enter the Hour Hand Width in cell C6.
  • Choose the C7 cell and enter:
=12-SUM(C5:C6)
  • We will get the blank space for hours.

inserting formulas to create analog clock in excel

  • Select cell C10 and enter:
=MINUTE(NOW())+(C15/60)
  • Press Enter.
  • We will have the value for the minutes in the clock.

inserting formulas to create analog clock in excel

  • Enter the Minute Hand Width in cell C11.
  • Choose cell C12 and enter:
=60-SUM(C10:C11)
  • As a result, we will get blank space for minutes.

inserting formulas to create analog clock in excel

  • Select cell C15 and enter:
=SECOND(NOW())
  • Press the Enter button.

inserting formulas to create analog clock in excel

  • We will have the value to control the seconds.
  • Set the Second Hand Width in cell C16.
  • Choose cell C17 and enter:
=60-SUM(C15:C16)
  • We will get the value that will control the seconds in the clock.

inserting formulas to create analog clock in excel

Read More: How to Create Digital Clock in Excel


Step 2: Creating the Clock Frame

  • Go to the Insert tab.
  • Choose the Doughnut Chart from the Insert Pie or Doughnut Chart option.
  • We will have a blank box on the screen.

inserting frame to create analog clock in excel

  • Right-click on the box and select Select Data from the available options.
  • A prompt will open on the screen.

inserting frame to create analog clock in excel

  • Click on Add in the prompt.

inserting frame to create analog clock in excel

  • In the Edit Series prompt, enter the following as the Series values:
={1,1,1,1,1,1,1,1,1,1,1,1}
  • Choose OK.
  • As a result, a data series will be added to the chart, setting the position of the hour.

  • Click on Add.

inserting frame to create analog clock in excel

  • Enter the same value as the previous one in the Series values. We are doing this for the minute hand.
  • Click OK.
  • This, too, will add another data series to the existing chart.

  • Click on Add.

  • Enter {1} as the Series value to give shape to the second hand.
  • Choose OK.

  • Click OK to exit the Select Data Source prompt.

inserting frame to create analog clock in excel

  • A Doughnut chart will be on the screen.
  • Click on the chart.
  • Go to the Format.
  • Set No Outline from the Shape Outline option.

inserting frame to create analog clock in excel

  • Turn off the Chart Title and Legend of the chart after clicking on the plus sign at the top-right corner of the chart.

inserting frame to create analog clock in excel

  • Choose any of the data series and right-click.
  • From the available options, choose Format Data Series.

inserting frame to create analog clock in excel

  • Change the Doughnut Hole Size to 60% from the Format Data Series tab on the right.

  • Right-click on the data series 2 from the chart.
  • Select Format Data Series.

 inserting frame to create analog clock in excel

  • Set the Angle of the first slice to 15%.

  • Turn on the Data Labels for the data series 2.

inserting frame to create analog clock in excel

  • Enter 12 in the data label that is at the top middle position.

  • Enter the rest of the chart labels as the sequence of an Analog Clock.

inserting frame to create analog clock in excel

  • Remove the fill color of the data series 2 by going to the Format tab and clicking No Fill from the Shape Fill option.

  • Turn on the data label of the data series 1.

inserting frame to create analog clock in excel

  • Choose cell D16.
  • Go to the Insert tab.
  • Select Symbol from the Symbols option.

inserting frame to create analog clock in excel

  • In the Symbol prompt, enter 25CF as the Character code.
  • Press Insert.

inserting frame to create analog clock in excel

  • As a result, the character will be inserted in the sheet.
  • Copy the character by pressing Ctrl+C.

  • Paste the character in the data label of the data series 1 by using Ctrl+V.

  • Do the same for the rest of the data labels.

inserting frame to create analog clock in excel

  • Turn off the fill color of the data series 1.

  • We will have the frame of our Analog Clock.

inserting frame to create analog clock in excel

Read More: How to Make a Clock Chart in Excel


Step 3: Inserting Time Hands

  • Choose the C5:C7 cell range.
  • Go to the Insert tab.
  • Choose the Pie Chart from the Insert Pie or Doughnut Chart option.

inserting time hands to create analog clock in excel

  • We will have a Pie Chart box on the screen.
  • Turn the Chart Title and Legend off for the chart.

inserting time hands to create analog clock in excel

  • Change the outline of the data series one to No Outline.

  • Set the fill color to No Fill.

  • Do the same for the data series 1.
  • We will have the portion of the Hour Hand Width.

inserting time hands to create analog clock in excel

Read More: How to Make a Running Clock in Excel 


Step 4: Aligning the Time Hand

  • Set the fill color of the background of the entire Pie Chart to No Fill.

inserting time hands to create analog clock in excel

  • Fit the Hour Hand inside the clock by adjusting the size of the Pie Chart.
  • Turn off the Chart Title and Legend of the Doughnut Chart.

  • Insert a Pie Chart for the Minute Hand and Second-Hand datasets.
  • Set the color of the hands different from each other.
  • Set the size of the hands so they are different from each other.
  • Adjust them inside the clock.
  • Click on any of the charts and press Ctrl+A.
  • Go to the Shape Format.
  • Choose Align Center from the Align option.

inserting time hands to create analog clock in excel

  • Go to the Shapes option from the Insert tab.
  • Select an oval shape from the available options.

inserting time hands to create analog clock in excel

  • Set it at the center of the clock.

Read More: How to Use VBA Code for Creating Digital Clock in Excel


Step 5: Applying VBA Code for Starting and Stopping the Clock

  • Go to the Developer tab.
  • Choose Visual Basic.
  • A new window will be opened.

applying vba code create analog clock in excel

  • In the Visual Basic window, choose ThisWorkbook under the VBAProject option.
  • A coding module will appear.

  • In the module, enter the following code and save it:
Sub StartClock()
Dim am_ws As Worksheet
Set am_ws = ActiveSheet
am_ws.Range("H5").Value = "Start"
x:
VBA.DoEvents
If am_ws.Range("H5").Value = "Stop" Then Exit Sub
Application.Calculate
GoTo x
End Sub
Sub StopClock()
Dim am_ws As Worksheet
Set am_ws = ActiveSheet
am_ws.Range("H5").Value = "Stop"
End Sub

applying vba code create analog clock in excel

  • Go to the Insert tab.
  • Select a rectangle shape from the Shapes option.

applying vba code create analog clock in excel

  • Enter the shape below the clock and name it Start.
  • Repeat the same process to insert a Stop box.

applying vba code create analog clock in excel

  • Right-click on the Start button.
  • From the available options, select Assign Macro.

applying vba code create analog clock in excel

  • Assign the StartClock macro to the button.
  • Finally, click OK.

  • Again, right-click on the Stop button.
  • From the prevailing options, select Assign Macro.

applying vba code create analog clock in excel

  • Assign the StopClock macro to that button.

  • Click the Start button to start the clock and the Stop button to stop the code.

applying vba code create analog clock in excel


Download the Practice Workbook

You can download the practice workbook here.


Related Article

Get FREE Advanced Excel Exercises with Solutions!
Adnan Masruf
Adnan Masruf

Adnan Masruf, holding a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, plays a pivotal role as an Excel & VBA Content Developer at ExcelDemy. His deep passion for research and innovation seamlessly aligns with his dedication to Excel. In this capacity, Masruf not only skillfully addresses challenging issues but also exhibits enthusiasm and expertise in gracefully navigating intricate situations, underscoring his steadfast commitment to consistently delivering exceptional content. His interests... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo