Track Your Treatments in Excel

image Don’t get too close to this blog today – I’ve got a miserable cold, and wouldn’t want you to catch it!

Roger Govier has created an Excel file to track your medical treatments, for people who have varying dosages or injection sites. It won’t help me feel better, but it might help you, or someone you know.

Enter the Treatment Sequence

Roger’s workbook has two worksheets – Calendar and Setup. Start on the Setup sheet, where you’ll enter the medication sequence.

First, enter your daily dosages in the Treatment List column.

  • For example, someone who’s taking a medication might be prescribed to take daily doses of 2 mg, 2mg, 3mg, 2mg, 5mg and then back to the start of the sequence.
  • They would fill in 5 cells in the Treatment List, shown in section 1 in the screenshot below.
enter your daily dosages in the Treatment List column
enter your daily dosages in the Treatment List column

Next, after you’ve entered the daily dosage sequence in the Treatment List, click the Fill Treatment Column button (number 2 in the screenshot above).

A macro runs, which clears the Treatments column (number 3 in the screenshot) and then fills it again, based on the treatment sequence that you entered.

View the Treatment Calendar

After setting up the Treatment Sequence, go to the Calendar sheet, which shows a monthly calendar.

At the top of the worksheet, select a year and month from the drop down lists.

Treatment02

Then, from the Start Treatment drop down, select the starting treatment for the selected month. In this example, the previous month ended with a 3mg dosage, so the fourth dosage, 2mg, is selected.

Treatment03

The calendar automatically adjusts to show the new treatment schedule.

Download the Sample Treatment Workbook

Click here to download Roger’s Sample Excel Treatment Workbook. It’s a zipped file in Excel 2003 format, and contains a macro.

You’ll have to enable macros to run the FillColumn macro on the Setup sheet.

Healing Music

If you’re sick too, this video, with the soothing sounds of Peggy Lee, might help you feel better, and get rid of your fever.

______

Old Excel Dogs Learn New Tricks

puppyblueYes, if your last name is Dalgleish, some people think it sounds like “Dog Leash”, and hilarity ensues. And no, I never get tired of that joke, thanks for asking. 😉

Anyway, unlike the proverbial old dog, those of us who have been using Excel for a long can CAN learn new tricks. Keep reading to discover which new Excel feature I recently discovered.

Long Time Excel Users

Maybe you’re a long time Excel user too. Last month I polled readers on my Debra D’s Blog, and asked How Long Have You Been Using Excel?

Almost half of the 80 respondents have used Excel for 16 years or more, and they shared some interesting stories in the comments.

HowLongUseExcel

Old Excel Habits

You learn a lot about Excel over the years, and appreciate both its strengths and limitations. You find workarounds for some of the features that don’t work the way you’d like, and accept that some things can’t be done in Excel.

Maybe you’ve even learned to love (tolerate?) the Excel Ribbon, despite all the years that you spent learning where the Menu commands were.

But occasionally, new features are added, without much hoopla, and you don’t even notice them. At least, that’s what happened to me!

Old Excel Header Tricks

Excel has customizable headers and footers, where you can place items like the date, or file name, in one of three sections — left, centre or right.

On the Excel Ribbon, click the Insert tab, and click the Header & Footer command, to change to Page Layout view, with the Header activated.

RiibbonHeader

See Header and Footer Tools

While the Header or Footer are activated, there’s a Design tab on the Ribbon, with Header and Footer tools.

You can click on an Element, like Page Number, to add it to a section in the Header or footer.

HeaderTools

Or, select one of the default options from the Header or Footer drop down lists.

HeaderList

The Page Layout wasn’t available in previous versions of Excel, but the Header and Footer Elements are pretty much the same as they’ve always been.

New Excel Header Tricks

After working with Excel 2007 for almost three years, I finally noticed that the Excel Header and Footer have some fancy new Options. (How embarrassing!)

Now you can have a different header/footer on the first printed page, and different header/footer on the odd and even printed pages.

HeaderOptions

So, you could show a title on the first page only, then have page numbers at the left on even pages, and on the right on odd pages.

HeaderDiffPage

Microsoft Word has always had these options, but Excel didn’t. We just accepted that “Excel isn’t a word processing program” and did without the header options.

Align Header and Footer

You can also align the Excel Header and Footer with the page margins, which is another nice feature. In the old days, the Header and Footer margins couldn’t be changed, so they sometimes looked a bit out of line with the rest of the printed page.

Here’s the Page Layout view, with the Align With Page Margins feature turned on.

align Excel Header and Footer with page margins
align Excel Header and Footer with page margins

I hope you found these new Excel Header and Footer options long before I did, and remember to use them in your printed worksheets.
__________

Select Answers With Excel Option Buttons

image Male or female? English or French? Yes, No or Maybe? Those are just a few of the choices that you can make with Option Buttons in Excel. When people select answers with Excel Option Buttons, you can provide a list of possible answers to a questions, and users can only select one answer from the list.

Continue reading “Select Answers With Excel Option Buttons”

Number Visible Rows in Excel AutoFilter

When you create a list in Excel, do you start with a column that numbers the rows? I usually create an ID column and type the number, or use a formula to automatically number them.

simple formula for row numbers in Excel list
simple formula for row numbers in Excel list

In the steps below, I’ll show you the simple numbering system. There’s a fancier formula too, if you’d like to see consecutive numbers when the list is filtered.

consecutive numbering for visible rows in filtered list
consecutive numbering for visible rows in filtered list

Continue reading “Number Visible Rows in Excel AutoFilter”

Excel Irish Flag St Patrick’s Day Excelebration

Sometime in the 1840s, probably because of the famine, my dad’s ancestors left Ireland, and boarded a ship to Canada.

The details are sketchy, but I’m sure they had first class accommodations, and sat at the Captain’s table every night.

Continue reading “Excel Irish Flag St Patrick’s Day Excelebration”

Edit Records in Excel Worksheet Data Entry Form

How can you make it easy for people to enter and edit data in Excel, but keep them away from the data storage worksheet?

Last year, I posted a Worksheet Data Entry Form in Excel, where users could enter and view Excel data. It was based on a worksheet data entry form that Dave Peterson created.

I’ve created a new version, where users can enter, view and edit the Excel data.

Version 1: Add New Records

In Dave’s original worksheet data entry form, users could add records on the data entry worksheet, and click a button to go to the database sheet, and review or edit the order records.

original Excel data entry form
original Excel data entry form

Version 2: View Existing Records

In version 2, I added a few buttons to Dave’s workbook, to allow users to scroll through the existing records.

With the navigation buttons, you could go to the first, previous, next or last record, or type a record number, to go to a specific record.

Excel data entry form scroll
Excel data entry form scroll

Version 3: Update Existing Records

In the latest version of the Excel Worksheet Data Entry form, I’ve added an update feature.

As in the previous version, there are data validation drop down lists, to select Item and Location.

The Price calculation is based on a VLOOKUP formula, and the Total formula multiplies the quantity by the price.

After you select a record, you can change its data, then click the Update button to copy those changes to the database.

Excel data entry form Update Existing Records
Excel data entry form Update Existing Records

For example, in the record shown above, if you discovered that there was an error, you could change the quantity from 500 to 200. The Total formula would automatically recalculate, to show the new total of $200.00.

Then, click the Update button, and the revised quantity and total would appear in that record on the database sheet.

The Update Code

Before updating the database record, the Update code checks to see of all the data entry cells are filled in. If they aren’t, a warning message appears, and the macro stops running. This prevents you from accidentally overwriting an existing record with blank cells.

Excel data entry message

If all the data entry cells are filled in, the code:

  • writes the current date and time in the applicable row of the database
  • adds the User Name from the Excel application
  • copies the data to the database
  • clears the data entry cells

Then, with a cleared data entry sheet, you can go on to add, view and edit other records, or save and close the workbook.

Download the Sample File

The zipped sample workbook, in Excel 2003 format, can be downloaded from the Contextures website: Worksheet Data Entry Form
___________

Go Undercover With Hidden Excel Worksheets

hiddenAn Excel workbook certainly isn’t Fort Knox, and the information you store there isn’t too secure. If someone opens your Excel workbook, and is determined to see everything in there, they’ll probably be able to.

However, if your goal is simply to make a workbook easier for people to use, you can hide some of the worksheets, so users don’t accidentally change their contents.

For example, if your data entry worksheet has data validation drop downs, you can store the lists on a different sheet, and hide that sheet.

Hide an Excel Worksheet

To quickly hide a worksheet in Excel 2007, right-click on the sheet tab, and click Hide.

SheetHide01

If you’re using an earlier version of Excel, activate the sheet that you want to hide. Then, click the Format menu, then click Sheet, and click Hide.

SheetHide05

Show an Excel Worksheet

To show the hidden sheet again, right-click any sheet tab, then click Unhide. (In earlier versions of Excel, click the Format menu, then click Sheet, and click Unhide.)

SheetHide02

In the Unhide dialog box, click on a sheet name, and click OK.

SheetHide03

Really, Really Hide an Excel Worksheet

If you want to hide a worksheet a little better, you can use a special technique that keeps it from appearing in the Unhide list.

  • First, to open the Visual Basic Editor (VBE), press the Alt + F11 keys.
  • In the Project Explorer, at the left of the VBE window, locate your workbook.
  • In the Microsoft Excel Objects folder for your workbook, click on the sheet that you want to hide
  • If the Properties window is not showing, press the F4 key to open it
  • At the bottom of the Properties window, in the Visible property, change the setting to -2 – xlSheetVeryHidden
  • Close the VBE and return to Excel

SheetHide04

The sheet is now hidden, and its name won’t appear on the Unhide list.

Watch the Excel Hidden Sheets Video

To see the steps for hiding Excel worksheets, you can watch this short Excel video tutorial.

______________

Sort Data With Excel Custom Lists

You know how to sort an Excel list alphabetically, and with Excel 2007 you can even sort an Excel list by colour.

Did you know that you can also create a custom list in Excel and use that to sort your data, instead of sorting in alphabetical or numerical order?

See how, in the written steps and video below

Sort by Custom List

Instead of sorting the products in this table alphabetically, we’ll create a custom list of products, and use it when sorting the list.

CustomSort01

Create a Custom List in Excel

You can create a custom list in Excel by importing a list from a worksheet, or by typing a new list. In this example, there is a worksheet named Lists, and it contains a product list.

We’ll import that list, to create the custom list.

CustomSort02

To open the custom list window:

  • Select the cells that contain the list items
  • On the Ribbon, click the File Tab (or the Office Button in Excel 2007)
  • Then click Options.
  • Excel 2010 and later: Click the Advanced category, then scroll down to the General section
  • Excel 2007: Click the Popular category, then look in the Top Options section
  • Click Edit Custom Lists

To add a custom list:

  • In the Custom Lists dialog box, the list address — $A$2:$A$5 — should appear in the Import range box. If not, you can click in the Import range box, and type a range, or select a range on the worksheet.

CustomSort04

  • To add the selected range as a custom list, click the Import button.
  • The list items will appear in the List entries section of the Custom List dialog box, and at the end of the list of existing Custom Lists.

CustomSort05

  • Click OK to close the Custom Lists dialog box, and click OK to close the Excel Options window.

Use the Custom List

You can use the custom lists when sorting, and you can also use them with the AutoFill feature. Type any item from a custom list in a cell, then use the Fill handle to complete the list.

CustomSort07

Sort Excel List in Custom Order

To sort your list based on your custom list, follow these steps:

  • Select a cell in the table that you want to sort.
  • On the Ribbon’s Data tab, click Sort
  • In the Sort dialog box, select a Column from the first drop down, and select Values from the Sort On drop down.
  • In the Order drop down, click Custom List
  • In the Custom List dialog box, select your custom list, and click OK
Sort Excel List in Custom Order
Sort Excel List in Custom Order
  • Click OK to close the Sort dialog box

The list is sorted in the order of the items in your custom list.

Watch the Excel Sort Video

To see the steps for adding an Excel Custom List, then sorting by that Custom List, watch this short Excel video tutorial.

____________