Create a Dynamic Excel Chart for Machine Running and Stoppage Times
Question details
Create a dynamic 24-hour visualization of running and stoppage periods for each machine.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to enter machine activity events and display daily operating and stoppage periods by machine.
- Observed behavior
- The desired view shows a 24-hour timeline for each machine, including multiple stoppages, and updates when event data changes.
Collect each event's machine name, start date and time, end date and time, and status. Use consistent status labels such as Running and Stopped, and include the correct date for events that cross midnight.
Build a 24-hour machine timeline with conditional formatting
Use an hourly color-coded grid when you need a dynamic timeline rather than a standard Excel chart object.
This example marks an hour if an event overlaps any part of it. Stoppage takes precedence over running when both occur in the same hour; blank cells indicate no matching event. Use shorter intervals if you need finer detail.
On one worksheet, enter Machine, StartTime, EndTime, and Status in cells A1:D1. Add events in rows 2 through 1000, using actual Excel date-time values and the labels Running or Stopped.
Enter Machine in F1 and list machine names in F2:F100. Enter the selected day's midnight date and time in G1, then enter =G1+TIME(1,0,0) in H1 and fill it through AD1. Format G1:AD1 as time.
Select G2:AD100. Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. Enter =COUNTIFS($A$2:$A$1000,$F2,$D$2:$D$1000,"Stopped",$B$2:$B$1000,"<"&G$1+TIME(1,0,0),$C$2:$C$1000,">"&G$1)>0 and choose a red fill.
With G2:AD100 selected, create another formula rule using =AND(COUNTIFS($A$2:$A$1000,$F2,$D$2:$D$1000,"Running",$B$2:$B$1000,"<"&G$1+TIME(1,0,0),$C$2:$C$1000,">"&G$1)>0,COUNTIFS($A$2:$A$1000,$F2,$D$2:$D$1000,"Stopped",$B$2:$B$1000,"<"&G$1+TIME(1,0,0),$C$2:$C$1000,">"&G$1)=0) and choose a green fill.
Change the date in G1 or edit events in A2:D1000 to refresh the timeline. Add machine names in column F as needed; extend the selected grid and formula ranges if you exceed the example limits.

Track Machine Running and Stoppage Times in WPS Spreadsheets
Use event records, hourly date-time headings, and conditional formatting in WPS Spreadsheets to create the same updating machine timeline.
- 1. Enter machine events: Open WPS Spreadsheets and enter Machine, StartTime, EndTime, and Status in A1:D1. Add the event records below, using Running and Stopped as status labels.
- 2. Create hourly headings: List machine names in F2:F100. Enter the selected day's midnight date and time in G1, enter =G1+TIME(1,0,0) in H1, and fill the formula through AD1.
- 3. Apply status colors: Select G2:AD100 and open Home > Conditional Formatting. Create formula-based red and green rules using the stoppage and running formulas in the solution above.
- 4. Save the workbook: Use File > Save As and select an Excel workbook format such as XLSX. Change G1 or the event records to view updated results.

Frequently Asked Questions
How do I show a different day in the timeline?
Enter the new date at midnight in G1. The hourly headings through AD1 and their conditional formatting will update for that day.
How are events that cross midnight handled?
Enter full dates and times in StartTime and EndTime, including the next day's date for an event that ends after midnight. The overlap formulas can then mark the event on each relevant day's timeline.
What happens if a machine runs and stops in the same hour?
The hourly cell is red because the running rule excludes any hour with a matching stoppage. Use smaller time intervals if you need to distinguish events within the hour.
Why is a machine's timeline blank?
Check that the name in column F matches column A, the status is Running or Stopped, and the start and end cells contain valid date-time values. Also confirm that the event overlaps the selected day and falls within rows 2 through 1000.




