I finally automated Excel timestamps, and it fixed my biggest data trust problem


Nothing kills a finely tuned Excel workbook faster than someone wondering whether the data is up to date. Instead of manually typing dates, you can make Power Query do the heavy lifting.

Imagine you’re managing a workbook that combines tables from multiple files. Even if everything is set up correctly, you still need to know when the data was last refreshed. A visible “Last Updated” timestamp removes that uncertainty and helps everyone trust the numbers they’re working with. Depending on your setup, you might want a single report-level timestamp or a more granular one for individual tables. Here’s how to create both.

Creating a report-level timestamp in Excel

Building a standalone “Refresh All” tracker

If you generally update all your data at once, a standalone “Last Refreshed” box is the cleanest solution. This is ideal for a README or dashboard worksheet that stores all the information about the workbook.

This method creates a dedicated query that updates whenever you click Data > Refresh All.

Refresh All in Excel's Data tab.

Here’s what you need to do:

  1. In Excel, click Get Data in the Data tab.
  2. Hover over From Other Sources.
  3. Select Blank Query.

Now, in the Power Query Editor:

  1. In the Query Settings pane on the right, change the Name to something descriptive like Manual_Refresh_Timestamp.
  2. In the formula bar, type = DateTime.LocalNow() and press Enter. This adds the date and time to the query output.
  3. In the rightmost Transform tab, click To Table > To Table.
  4. Double-click the column header and rename it Last Manual Workbook Refresh.
  5. Click the ABC123 icon in the column header and choose Date/Time.

At this point, you have a functional clock sitting in the Power Query Editor. Just keep in mind that this uses the system time of the machine performing the refresh, which can matter if multiple people in different locations are updating the workbook.

To finish the process, you need to load it to your dashboard:

  1. In the Home tab, click Close & Load > Close & Load To….
  2. In the Import Data dialog, select Table and Existing Worksheet.
  3. Click the collapse icon (the up arrow), select the specific cell on your dashboard where you want the timestamp to live, and press Enter.
  4. Click OK.

Now, you have a general status indicator for your file. All that’s left to do is format it so that it looks the part. For example, remove the filter buttons and choose a different table style in the Table Design tab, apply any direct formatting like changing the font size or applying bold in the Home tab, and add seconds to the time via the Format Cells dialog (Ctrl+1).

A Dashboard in Excel containing a timestamp of the last manua workbook refresh.

It’s important to note that if an individual query refreshes separately, this workbook-level timestamp can become outdated. It only updates when you click Refresh All in the Data tab or when the specific query tied to this cell is executed. To address this limitation, the next section shows how to create a table-level timestamp in Power Query.

Clicking Data > Refresh All triggers a full refresh of your workbook’s data connections, including Power Query queries and PivotTables, though they may not all update at exactly the same time.

Inserting independent Power Query table refresh timestamps

Using the hidden column failsafe

Because the report-level timestamp can be bypassed by individual table updates, it’s helpful to have a more granular failsafe for individual queries.

You might be tempted to try other methods to fix this, such as creating a separate reference query or appending a timestamp to the bottom of your loaded dataset. However, while reference queries are tied to the original query, they don’t provide an independent timestamp. And appending a timestamp to the bottom of your table will only confuse Excel when you sort the data or use dynamic array formulas to pull information from it.

For these reasons, building a timestamp directly into the data via a custom column is the most secure approach:

  1. In Excel, open the Data tab and click Queries & Connections.
  2. In the sidebar, right-click your main query and click Edit.
  3. In the Power Query Editor, click Add Column > Custom Column.
  4. Name the new column Query Last Updated and paste the following into the Custom column formula field: = DateTime.LocalNow().
  5. When you click OK, a new Query Last Updated column is added to the table. Although the timestamp appears on every row, Power Query evaluates it once per refresh—not once per row. Click the ABC123 icon in the column header and choose Date/Time.
  6. Click the top half of the Close & Load button in the Home tab to see the updated query in its existing location in your workbook.

As it stands, your table looks untidy with the date and time repeated on each row, so to polish things off, you need to create a linked cell that references the table’s data while keeping the source column hidden:

  1. If you want to make your time more specific with seconds, create a Custom Format in the Format Cells dialog (Ctrl+1).
  2. Reduce the width of the column immediately to the right of your query output to create a single buffer column.
  3. In a cell in the next column, type =, then select the header and the first data cell of your Query Last Updated column so that both cell references are added to your formula.
  4. When you press Enter, the data is duplicated in those two cells, but the date-time cell might lose formatting. So, select a date-time cell from your table, and use the Format Painter to duplicate the formatting to your independent duplicated cell.
  5. Finally, right-click the header of the Query Last Updated column and click Hide.

After applying any manual formatting (such as adding borders and center-aligning your text), you have a professional table-specific refresh timestamp that updates when:

  1. You click Data > Refresh All.
  2. You right-click the table and click Refresh.
  3. The query refreshes automatically based on a scheduled interval you’ve configured.
A Revenue Statistics worksheet in Excel with a Query Last Updated timestamp.

By using this “passenger” column approach, you ensure the timestamp stays in sync with both the query’s last successful refresh and any workbook-wide data refreshes. If the table updates, the column updates, and if the column updates, your Query Last Updated cell reflects it instantly.

One common concern is whether the hidden column will reappear after a refresh. If you notice layout changes, open Table Design > Properties and check Preserve column sort/filter/layout and Preserve cell formatting. Similarly, to prevent column widths from resetting after you adjust them manually, uncheck Adjust column width in the same dialog.


Automating your “Last Updated” timestamp keeps your Excel reports transparent and trustworthy without manual effort. It’s a small change that significantly improves usability while keeping your sheets clean. Did you realize that you used M language in this process? It’s the powerful engine behind Power Query, and it’s surprisingly approachable once you know the basics. Take a few moments to explore other M language snippets that can automate your workbook in ways standard formulas can’t.

OS

Windows, macOS, iPhone, iPad, Android

Free trial

1 month

Microsoft 365 includes access to Office apps like Word, Excel, and PowerPoint on up to five devices, 1 TB of OneDrive storage, and more.




Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Serials have become the backbone of the streaming era, especially on Netflix. Serialized television is when a show’s plot unfolds in sequential order over the course of a season. It’s long-form storytelling that typically works best with dramas—Stranger Things, The Crown, etc. Watching the episodes in release order matters. Often, these shows are binged because the complex character arcs and cliffhangers encourage streaming multiple episodes at once.

Serial shows can feel like homework, especially when you fall behind on an episode and need to catch up. That always happens to me, and it leads to anxiety I didn’t want. Thankfully, Netflix offers shows where viewers can jump at any time and not feel lost. These episodic series are perfect for jumping around and picking the episodes you want to watch. One of the most famous comedies ever fits the criteria of an episodic sitcom. Anthology shows, including a Netflix sci-fi classic, are also ideal for watching episodes out of order.

Black Mirror

Welcome to your worst nightmare

Black Mirror wants to scare you. Charlie Brooker’s sci-fi anthology series has been warning humanity about the dangers of technology since 2011. It seems like ages ago that Rory Kinnear had sexual intercourse with a pig in the first episode. Apologies for the spoiler, but the media’s role in the spread of misinformation has never been more relevant.

Black Mirror features self-contained episodes with a beginning, middle, and an end. There has only been one direct sequel: USS Callister: Into Infinity, a season 7 episode that continues the events of season 4’s USS Callister. Otherwise, feel free to jump around and check out the best episodes of each season. Since most episodes feature bleak endings, I’ll leave you with one that ends on an upbeat note: San Junipero.

Seinfeld

Greatest comedy ever?

Comedies are the perfect vehicle for episodic storytelling. While having an overarching plot throughout a season helps attract viewers, many comedy fans are just looking for a few laughs. Write a self-contained story with numerous jokes over 20 to 30 minutes, and you’re ready to go. Seinfeld, aka the show about nothing, is the ideal escape from serialized dramas.

Seinfeld stars Jerry Seinfeld as a fictionalized version of himself as he navigates the comedic scene in New York City. The show revolves around Jerry’s interactions with his friends George (Jason Alexander), Elaine (Julia Louis-Dreyfus), and Kramer (Michael Richards). The gang faces a problem, hilarity ensues, and the episode ends. That’s really all you need to know. Enjoy the laughs.

Guillermo del Toro’s Cabinet of Curiosities

The genre maestro curates new horror stories

There’s a reason why Guillermo del Toro is considered the “King of the Monsters.” The genre expert is as elite as it comes when dealing with mythology and creating new worlds. The Oscar winner relied on his horror expertise in the anthology series Guillermo del Toro’s Cabinet of Curiosities.

I hate referring to episodes of television as “mini-movies.” However, that’s how I would describe the eight episodes of Cabinet of Curiosities. Each director puts their own signature style on a story and brings audiences into their terrifying creation. Del Toro wrote two of the episodes, including one about a demon being summoned. Some are scarier than others, but horror fans will feel right at home with this series. ​​​​​​​

Beat Bobby Flay

Bobby brings the heat

As I’ve gotten older, the Food Network has become one of my favorite channels. I mean, who doesn’t love food? I love eating my (average) home-cooked meal while watching contestants duke it out in the kitchen on my favorite show, Beat Bobby Flay. The competition breaks down into two rounds. In the first round, two chefs have 20 minutes to construct a meal using a secret ingredient. The winner advances to the main event, where they face off against Bobby Flay.

The challenger gets to pick the dish for the final round, so Bobby has a disadvantage. However, Bobby is an award-winning chef with a few tricks up his sleeves. He can handle making a version of your grandmother’s lasagna. With episodes available on Netflix, be prepared to learn why Bobby always throws chiles into his dishes.​​​​​​​

S.W.A.T.

Broadcast TV still knows how to make entertaining programs

The procedural is a genre best produced on broadcast television. Name a cop, doctor, or law drama—chances are it’s a procedural on broadcast TV. While the way we watch television has changed, people still love these types of shows on CBS, NBC, Fox, and ABC. Law & Order, NCIS, and Criminal Minds are procedurals that gained a bigger following thanks to streaming.

S.W.A.T. is cut from the same cloth as Chicago P.D. and CSI. Sergeant Daniel “Hondo” Harrelson (Shemar Moore) is tasked with leading a new S.W.A.T. unit in the LAPD. This action-packed show utilizes a “case of the week” formula in which the team must solve a dangerous situation, such as active shooters and hostage situations. You’re in and out in 44 minutes. What’s better than that?​​​​​​​


Netflix has more content coming your way

After you’re done watching these shows, stay on Netflix for more top-notch content. Netflix has an entire section dedicated to thrillers, and this week, The Guilty and El Camino are two of the section’s best. Keep an eye out for new movies, like Alan Ritchson’s War Machine, which is currently in the streamer’s top 10.

Subscription with ads

Yes, $8/month

Simultaneous streams

Two or four




Source link