Forum Discussion
Automatic Date Update (No Interaction)
Any data source can be set to auto-refresh and almost all data sources have a system time function that can be returned to Excel using MS Query or PowerQuery. Here is the PQ example:
- In Excel use menu option: Data > New Query > From other sources > Blank Query
- In PQ use menu option Advanced Editor and make this edit
let
Source = DateTime.LocalNow
in
Source - Click Done
- Click Invoke
- Click File > Close & Load
- In Excel click Table Tools Design > Properties
- Click small icon (connection properties) next to Name:
- Check Refresh Every and set to 1 minutes
- Click OK twice to close properties
You now will have the current date updated every minute automatically. You can add formulas to calculate time elapsed from the "Invoked Function" table.
- ldcox8551Sep 08, 2020Copper Contributor
Worked perfectly. Thank you very much. I've never used Query before and you made it very easy to figure out.
- Craig HatmakerSep 08, 2020Iron Contributor
ldcox8551Glad it worked for you. BTW - I like Bennadeau's solution. If you need updates quicker than 1 minute, use it. If not, my PQ approach does not require VBA. I love VBA, but then, I'm a coder and not everyone is. VBA can also trigger security alerts.
- ldcox8551Sep 08, 2020Copper Contributor
Thank you for the information. I will try this now.