Sugar Spreadsheet

My wife reckons that nobody is interested in this, but I’ll share it nonetheless.

The spreadsheet where I record all my sugar is here. I’ve shared it to my web site folder, so hopefully you can see it. It comes down as a .xlsm file, which can be recognised by Excel 2016, which you get from Office 365. XLSM presumably means “a spreadsheet containing macros”.

The spreadsheet has about 4 rows of dummy data, just so you can see what you have to enter. You just need to enter the time, date and value. Other columns are optional i I record how much insulin I take, and what monitor I use to measure – and those with a grey background are calculated.

To calculate statistics, just hit the button in the top-right, and follow the instructions. I’ve put a little macro under there which will ask for the first row you want to calculate stats for, and the last row. It’ll then work out when was “one month ago”, and write the number of entries, the average and the standard deviation in columns E, F and G. Please note that where you just have one reading for the last month, the mean will just be that reading. And, you need at least 2 readings during the last month in order to calculate a standard deviation, so with just this sample data, each cell in Column G shows an error (which will go away as you add that second row).

The macro is very basic, its main purpose is to work out which days are within the last month. it is quite crude, will expect the data to be in chronological order, and will behave unreliably id not. I really developed it for myself rather than for public consumption.

Software provided on a “best endeavours” basis. The macro is written in a language called VBScript, which I’ve never ever seen in the last 10 years! You can view and change the source code, in any case.

One comment

  1. Reblogged this on Stroke Survivor and commented:

    Almost a year ago, I published a template for recording your blood sugar. On Blogger. When it ported to WordPress, the attached file didn’t come over. It is a Microsoft Excel (current version) which contains a macro. An XLSM file. WordPress does not allow me to upoad them.

    So, I’ve put this file into an archive. WordPress *does let me upload them. And am reposting.

    If you enter your sugar, in UK units (mmol/l) then the macro will calculate your value in US units (mg/dl) and calculate a rolling average, taken from every value in the last six weeks.
    To fire the macro, hit the button on the spreadsheet. It deliberately doesn’t fire automatically, which was a pita wnen entering data.

    The source code for the macro is included, so you can change it as you see fit. I am providing the whole thing on a “best endeavours” basis. Use it at your own risk. Good luck.

    https://strokesurvivor508830397.files.wordpress.com/2018/11/sugar-template.zip

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s