Skip to Main Content

Script: Log your weight over time with Excel


Weight-watchers, remind yourself to weigh in and log your current weight into an Excel spreadsheet automatically.

I've adapted a simple VB Script (Windows only) that pops up a dialog like this:

When you enter your weight and press OK, the script appends the current date and your weight to a two-column Excel spreadsheet. Schedule this script to run when you log on every morning, or once a week. Never forget to keep track of your weight again, and make shiny line charts graphing your diet progress in Excel once you've logged enough data.

How to download the script and set it up, after the jump:

  1. Right-click on this WeightLogger.vbs script and save to your computer.

  2. Create a new spreadsheet called weight.xls. Column A will be "Date" and Column B will be "Weight."

  3. Using your favorite text editor, open the WeightLogger.vbs script you just downloaded. Enter the path to where your weight.xls spreadsheet lives and save.

  4. Double-click on the WeightLogger.vbs script. If all goes well*, a dialog box will prompt you for your weight. Enter a number and hit ok. Your current weight will be entered into weight.xls.

  5. To schedule regular weigh-ins, in Control Panel choose Scheduled Tasks. Schedule the WeightLogger.vbs script task to run every day or every week, at your discretion.

* Note: The Windows Script Engine is required to run VBS scripts. Download it here if you get a message along the lines of "no script engine for file extension .vbs."

I'm what you'd call a novice VB scripter, so if you're a coder with improvements this here script, lemme know - tips at lifehacker.com.

Also, this simple script can be adapted to log all sorts of things in Excel. What do you need to capture?