Awards
Join OfficeTipsAndMethods

Have some suggestions to share with the world?

Join OfficeTipsAndMethods and share your insight in a Comment. You must be a member to comment and all comments are moderated before being published. Membership is free and we would never share your personal information with anyone.

Become an OTM Member

Log In

YouTube Video Channel
OfficeFix
Article Categories

Archive for the ‘Excel 2007’ Category

Build an Excel Navigation Panel

Image result for NAVIGATIONNavigating within an Excel workbook is simple enough if the workbook contains one or two worksheets and if you are familiar with working with multiple worksheets. However, if the workbook as more than a few worksheet or the user is not comfortable with a multiple sheet environment, navigation can be a little more involved, even a little intimidating.

In this article we will discuss creating and using hyperlinked drawing objects to create an intuitive menu system for an Excel Workbook.

 

SNAGHTML9f2d87e

image

Scenario

The workbook we will be enhancing is used to manage attendance records for employees at each of five locations. Each location is represented by one worksheet for each of three shifts plus one worksheet for the location’s employee list. Unless you are working on a very wide monitor and/or at very high resolution, seeing the tabs for all sheets at the same time will be unlikely:

image

So going directly from Location A to Location D, for example will require at least one extra step in addition to a mouse-click on the desired sheet tab. In some Excel version two additional steps are needed. First you need to right-click in the sheet navigation area, then select the desired sheets. In some versions of Excel, you will only see 15 sheet names when you right-click the navigation area and may have to select “More Sheets” to be able to access all sheets.

SNAGHTML4ac3ffd

 

image

A custom navigation pane will make the process of navigating from one location to any other location in the workbook simpler and more efficient that the stock method of selecting sheet tabs.

‘Own-use’ vs. External User

While the same general techniques apply whether you are designing a navigation panel in a workbook solely for your own use or for another person who will be working with the workbook on a regular basis, designing the panel for someone else to use requires more thoughtful and detailed planning.

Objectives

The navigation should be simple to use, have an attractive look and feel that is consistent throughout the workbook, be visible at all times, and require a minimum number of mouse clicks for the user to switch from one worksheet to another.

Create a Prototype Menu

The more time you put into designing and perfecting a prototype menu, the easier it will be to apply the finished menu to the rest of the workbook. Start by creating an additional sheet which you will use as a sort of drawing canvas for creating the prototype menu. In the sample workbook, this sheet is named ‘Menu Prototype.’

If you used consistent naming principles for the worksheets when  you created the workbook, you can take advantage of Excel features like copy and paste and object grouping to take some of the tedium involved with building your prototype menu

  • Drawing Objects

Almost any drawing object is suitable for individual menu elements. Simple rectangles arguably make the most efficient use of available space.

  • Effects

Excel drawing objects, especially in the 2007 and later versions, offer a wealth of visual effects to set them off from normal worksheet contents.

  • Hyperlinks

Hyperlinks can be applied to most drawing objects. Waiting to apply them until you have fixed the basic properties of the object makes them a little easier to work with.

  • Properties

By default, drawing objects are moved and re-sized with cell. To ensure the menu doesn’t get automatically moved or re-sized, change the relevant property.

NOTE: Screenshots in this article were developed using Excel 2016. If you are using an earlier version of Excel, what you see an your screen may look a little different from these illustrations

Step-by-step, here’s how to build a prototype menu.

  1. Create a simple drawing object such as a rectangle. Use your mouse to drag the crosshair ( c ) to draw the rectangle shape. You can refine the size of the rectangle to what works best for you.SNAGHTML5a89b04

SNAGHTML5a949b3

After you have drawn the shape, click to select it

image

 

and set the height and width of the object on the Drawing Tools Format Ribbon Tab ( f ).

image

2. With the object selected type a caption that will indicate where the button will take the user when they click it. Use the Home Tab’s alignment buttons to align the caption within the button.

SNAGHTML955626f

3. Duplicate the button. You can use copy and paste but it’s faster to use Ctrl D (duplicate). You will need as one copy of the button for each option you want to offer the user. You will need to modify the caption for each button but it is faster to do this after you have made all duplicates you will need.

TIP: In some versions of Excel, if you position the first duplicate where you want it relative to the original, then continue duplicating, additional duplicates will automatically position themselves relative to the previous duplicate.

4. If necessary, drag the buttons roughly to the positions you would like them to be relative to each other. Use the Align commands on the Drawing Tools/Format Ribbon tab to refine their alignment. Select all of the buttons and use the distribute commands to make the layout more symmetrical.

image

image

5. When you have the buttons laid out to your satisfaction, with all the buttons selected use the Group command to combine them into a new custom object.

6. With the new group selected, use shape effects to give your menu panel and buttons a distinct ‘look and feel.’

SNAGHTML98f8946

 

image

7. With the menu group still selected right-click it and select size and properties. In the size and properties pane (or dialogue, depending on your Excel version), set the size property to “Don’t move or size with cells.”

image

 

8. De-select the group and then select each button in turn to assign its hyperlink.

SNAGHTML9a9572b

Choose “Place in This Doucment ( a )," then select the name of the sheet to which you want this button to lead ( b ). Type the name of the cell you want to activate on the selected sheet ( c ). Then click the ScreenTip button and enter the tip you would like to pop up when the user’s mouse hovers over the button.

image

Pay close attention to all the details when you set up your prototype menu. Once you are satisfied that it looks and performs as you want it to, simple copy and paste it to every worksheet in the workbook.

Apply the Menu to all Worksheets

Positioning the menu panel in a consistent location on every worksheet will give your workbook a more professional appearance. Here is a horizontal menu located at the top left or a worksheet.

image

And here is a vertical menu, also located at the top left of a worksheet.

 

image

You can also remove the hyperlink from the button that represents the sheet on which a menu panel is located and ‘grey-out’ the caption for that button.

image

For horizontal menu panels, set the height of Row A to the height of the menu panel. For vertical menu panels, set the width of Column 1 to the width of the menu panel. If you want to prevent then menu panel from scrolling off, use the freeze panes command to lock the top row or first column of each worksheet.

Advantages

  • Intuitive
  • Makes navigation easier
    • Direct access to specified worksheet
    • Direct access to specific location, if needed

Disadvantages

  • Takes time to plan and create
  • Sacrifices some workspace

A hyperlinked menu navigation panel will simplify moving from sheet to sheet in workbooks that have more than a few worksheets.

Build an Excel Navigation Panel

Image result for NAVIGATIONNavigating within an Excel workbook is simple enough if the workbook contains one or two worksheets and if you are familiar with working with multiple worksheets. However, if the workbook as more than a few worksheet or the user is not comfortable with a multiple sheet environment, navigation can be a little more involved, even a little intimidating.

In this article we will discuss creating and using hyperlinked drawing objects to create an intuitive menu system for an Excel Workbook.

 

SNAGHTML9f2d87e

image

Scenario

The workbook we will be enhancing is used to manage attendance records for employees at each of five locations. Each location is represented by one worksheet for each of three shifts plus one worksheet for the location’s employee list. Unless you are working on a very wide monitor and/or at very high resolution, seeing the tabs for all sheets at the same time will be unlikely:

image

So going directly from Location A to Location D, for example will require at least one extra step in addition to a mouse-click on the desired sheet tab. In some Excel version two additional steps are needed. First you need to right-click in the sheet navigation area, then select the desired sheets. In some versions of Excel, you will only see 15 sheet names when you right-click the navigation area and may have to select “More Sheets” to be able to access all sheets.

SNAGHTML4ac3ffd

 

image

A custom navigation pane will make the process of navigating from one location to any other location in the workbook simpler and more efficient that the stock method of selecting sheet tabs.

‘Own-use’ vs. External User

While the same general techniques apply whether you are designing a navigation panel in a workbook solely for your own use or for another person who will be working with the workbook on a regular basis, designing the panel for someone else to use requires more thoughtful and detailed planning.

Objectives

The navigation should be simple to use, have an attractive look and feel that is consistent throughout the workbook, be visible at all times, and require a minimum number of mouse clicks for the user to switch from one worksheet to another.

Create a Prototype Menu

The more time you put into designing and perfecting a prototype menu, the easier it will be to apply the finished menu to the rest of the workbook. Start by creating an additional sheet which you will use as a sort of drawing canvas for creating the prototype menu. In the sample workbook, this sheet is named ‘Menu Prototype.’

If you used consistent naming principles for the worksheets when  you created the workbook, you can take advantage of Excel features like copy and paste and object grouping to take some of the tedium involved with building your prototype menu

  • Drawing Objects

Almost any drawing object is suitable for individual menu elements. Simple rectangles arguably make the most efficient use of available space.

  • Effects

Excel drawing objects, especially in the 2007 and later versions, offer a wealth of visual effects to set them off from normal worksheet contents.

  • Hyperlinks

Hyperlinks can be applied to most drawing objects. Waiting to apply them until you have fixed the basic properties of the object makes them a little easier to work with.

  • Properties

By default, drawing objects are moved and re-sized with cell. To ensure the menu doesn’t get automatically moved or re-sized, change the relevant property.

NOTE: Screenshots in this article were developed using Excel 2016. If you are using an earlier version of Excel, what you see an your screen may look a little different from these illustrations

Step-by-step, here’s how to build a prototype menu.

  1. Create a simple drawing object such as a rectangle. Use your mouse to drag the crosshair ( c ) to draw the rectangle shape. You can refine the size of the rectangle to what works best for you.SNAGHTML5a89b04

SNAGHTML5a949b3

After you have drawn the shape, click to select it

image

 

and set the height and width of the object on the Drawing Tools Format Ribbon Tab ( f ).

image

2. With the object selected type a caption that will indicate where the button will take the user when they click it. Use the Home Tab’s alignment buttons to align the caption within the button.

SNAGHTML955626f

3. Duplicate the button. You can use copy and paste but it’s faster to use Ctrl D (duplicate). You will need as one copy of the button for each option you want to offer the user. You will need to modify the caption for each button but it is faster to do this after you have made all duplicates you will need.

TIP: In some versions of Excel, if you position the first duplicate where you want it relative to the original, then continue duplicating, additional duplicates will automatically position themselves relative to the previous duplicate.

4. If necessary, drag the buttons roughly to the positions you would like them to be relative to each other. Use the Align commands on the Drawing Tools/Format Ribbon tab to refine their alignment. Select all of the buttons and use the distribute commands to make the layout more symmetrical.

image

image

5. When you have the buttons laid out to your satisfaction, with all the buttons selected use the Group command to combine them into a new custom object.

6. With the new group selected, use shape effects to give your menu panel and buttons a distinct ‘look and feel.’

SNAGHTML98f8946

 

image

7. With the menu group still selected right-click it and select size and properties. In the size and properties pane (or dialogue, depending on your Excel version), set the size property to “Don’t move or size with cells.”

image

 

8. De-select the group and then select each button in turn to assign its hyperlink.

SNAGHTML9a9572b

Choose “Place in This Doucment ( a )," then select the name of the sheet to which you want this button to lead ( b ). Type the name of the cell you want to activate on the selected sheet ( c ). Then click the ScreenTip button and enter the tip you would like to pop up when the user’s mouse hovers over the button.

image

Pay close attention to all the details when you set up your prototype menu. Once you are satisfied that it looks and performs as you want it to, simple copy and paste it to every worksheet in the workbook.

Apply the Menu to all Worksheets

Positioning the menu panel in a consistent location on every worksheet will give your workbook a more professional appearance. Here is a horizontal menu located at the top left or a worksheet.

image

And here is a vertical menu, also located at the top left of a worksheet.

 

image

You can also remove the hyperlink from the button that represents the sheet on which a menu panel is located and ‘grey-out’ the caption for that button.

image

For horizontal menu panels, set the height of Row A to the height of the menu panel. For vertical menu panels, set the width of Column 1 to the width of the menu panel. If you want to prevent then menu panel from scrolling off, use the freeze panes command to lock the top row or first column of each worksheet.

Advantages

  • Intuitive
  • Makes navigation easier
    • Direct access to specified worksheet
    • Direct access to specific location, if needed

Disadvantages

  • Takes time to plan and create
  • Sacrifices some workspace

A hyperlinked menu navigation panel will simplify moving from sheet to sheet in workbooks that have more than a few worksheets.

Excel Function Key Shortcuts

I resisted learning and using keyboard shortcuts for more years than I care to admit. In recent years, however, I have come to appreciate just how valuable keyboard shortcuts can be in Excel and almost any other application you can name. The Blog ExcelTip has just published a detailed article about Function Key Shortcuts that is definitely worth a read if your are interested in expanding your shortcut key horizon.

Excel Data Entry Tricks

Linked In member Victor Chan publishes an excellent blog at Launch Excel. In two of his recent articles,

 

Working with Data in Excel Part 1- 10 Excel Data Entry Tips Everyone Should Know

and

Learn how to become an Excel Power User with our Top 20 Mouse Tricks for Excel

Victor discusses very useful Excel Data Entry techniques. Check out Victor’s articles to learn how to improve your Excel efficiency. He also offers a nicely organized collection of Excel shortcuts free if you subscribe to his blog.

Here’s another nice trick I recently learned about. Create and use a custom list to manage lists of names that you use repeatedly in a worksheet.

 

Create and Use Custom Lists

You can create and use custom list for sorting and for speeding data entry

For example, you are using an Excel Worksheet to manage shift assignments for the same group of people every week. Occasionally you need to sort the list by the names but you do not want the sorted list to be in alphabetical order. A custom list will give you that flexibility.

image

 

Start by typing the list of names, in the order you would like them, in an out of the way place. This list can be located on an otherwise unused worksheet for example. Just type one name in a cell and press enter and type the next name. When you are finished you should have a vertical list of names with no blank cells. I have created a list of six names but your list could be much longer.

If you select this list before starting the next step you will be able to import it into your custom lists with just the click of a button.

 

image

 

Now, in Excel 2010, click the File button (in 2007, click the Office button) and click Options (in 2007, Excel Options).

Select Advanced. You will need to scroll down a bit. Look for the Edit Custom Lists button and click it.

That will bring up the Custom lists dialogue. There will be at least four custom lists already there if Excel was properly installed on your system.

 

 

image

 

You should see the range you selected already filled in beside the caption, “Import list from cells.” Click the Import button and your newly created list will appear at the bottom or your custom lists.

 

 

 

 

Sort Using a Custom List 

Whenever you want to sort a list that contains these names into the order of your custom list, all you need to do is select the Sort button on the Ribbon and specify custom for the sort  level that refers to the column containing these names.

 

image

When the custom list dialogue appears, select your custom list.

Use a Custom List for Data Entry

If you have ever used autofill to create a list of months or days, you will love this added benefit of having a custom list. Once you have create a custom list, you can type one of the names form the list and then use autofill to create a list of all the names in the order of the custom list.

So, for the shift assignment example, when it comes time to create new shift assignment list, all you need to do is type one of the names from you custom list and use autofill to type the rest for you either vertically or horizontally.

Don’t Discard Your Original List

If you must occasionally add or remove names from your roster, do it in the list you built to import into custom lists. When you have that list up to date, select it and go to the Custom Lists dialogue. Click on your original custom list and delete it, then Import the revised list.

Using this technique will save you a few minutes every time you have to create a new roster for you shift assignments. The time it took you to build and import the list as a custom list will quickly be paid back ten-fold.

Conditional Formatting–Everything You Wanted to Know but Were Afraid to Ask

At one time one of my job responsibilities included budget management and financial reporting for the charity I worked for. Among other things, I had to identify, analyze, and report on variances on each account that was $1,000 or more over or under budget. At the time, my employer operated offices in four locations, with three or four departments in each location. So I had a fair number of accounts (as I recall about 600) to review every month just to identify those that needed further attention.

Keep in mind that personal computers spreadsheet software were, if not in their infancy, still in their very early youth. These were the days of DOS and non-graphic spreadsheets. Colour monitors, were as yet virtually unheard of.

So, at the time, the best solution I could come up with was a conditional formula in cells adjacent to the variance column that displayed an asterisk when the actual value was $1000 or more over or under budget.

image

image

Formulas

The formulas in column G use the ABS() function to calculate the variance. Printed reports had to show this value for all accounts. The formula first calculates the difference between the actual and budget for the account. ABS calculates the absolute value of the result. So whether the variance is positive or negative, it will be displayed as a positive number.

Column H will display asterisks only if the variance is $1,000 or greater. The formulas use the IF() function to test the variance for being equal to or greater than $1,000. If the test is true, the cell displays an asterisk “*”. The third argument “” cause the cell to display a blank. “” is known as the empty string. You can use it anywhere that you need to have text with no actual characters.

Welcome to the recent past

By today’s standards my solution was rather primitive. With the advent of Graphical interfaces in general and Excel for Windows in particular, conditional formatting became available. With conditional formatting, you can control the format of a cell depending on a rule you create. The format of the affected cells changes automatically depending on whether the rule is true or false whenever the worksheet is recalculated.

So now, something like this became available:

image

You could set up to three rules so you could highlight cells differently according to the rules you set. So you could visually rank cells according to their values.

image

Here I have three rules. If the cell value is less than $500.00 the fill colour should be green. If the cell value is $500.00 – $999, the fill colour is yellow. For variances of $1,000 and more, the fill colour is red.

It is also possible to control the formatting of a cell depending on the value of a different cell:

image

Conditional formatting not only makes it easy to flag serious error conditions (reportable variances in this case) but also enables more pro-active flagging. So, in this example a red cell indicates that variance reporting is required; yellow indicates an account that should be reviewed and monitored; green indicates that no action is needed for the line item at this time. By yellow flagging accounts that may be on their way to a serious variance you can be pro-active and start looking for ways and means to prevent the item from sliding out of control.

Welcome to the 21st Century

Excel 2007 introduced some major enhancements to Conditional Formatting. Now we don’t just have a choice of graphics to convey information about our data even more effectively.

image

Here the conditional formatting in column G indicates the relative value of each variance by the size of the bar. In column H the traffic light icons indicate whether a report is required for the variance, whether the account should be watched more closely, or whether current results for the account are within satisfactory limits.

The possibilities of Conditional Formatting, while not endless, are extensive. Whether your worksheet is strictly a working document designed to help you manage you job responsibilities more effectively, or whether your worksheet is part of a presentation to your boss or others, Conditional Formatting is well worth exploring.

Have You Pinned Lately

Excel, PowerPoint, and Word 2007 all have Recent Documents lists on the Office Menu. You can set an option for the number (up to 50) OddGiftof document titles to be displayed on this list. It’s a handy way of getting back to documents that you have recently worked on. You don’t need to remember where the document is. Just click the name  in the Recent Documents list.

Quote of the Day

Ultimately, the only power to which man should aspire is that which he exercises over himself.

– Elie Wiesel

Even with the option set to retain 50 documents on the list, however, a document that you use only occasionally may be forced off the list if you work with a large number of different documents. Tracking down files that you use Office Menuonly once in a while can be challenging, to say the least.  Did you know that you can mark a document name so that it always stays on the list?

To the right of each document name, there is a grey pushpin icon. If you click that icon, the icon will change so that it looks like it is pushed into a corkboard and the colour will change to green. A document name with the green pushpin will always stay on the Recent Documents list, regardless of how many other documents you open and close or how long since you have opened the document.

The name will not always be on the top but it will be in the Recent Documents list. So, if you only open that Greeting Card list once a year and want to find it easily next year, click its pushpin icon on the Office Menu. The next time you go to open it, that once a year document will probably be at the bottom of the list but it will still be there waiting for you to click its name so you can get ready to send next years cards.

Play Nicely with Others

Windows Live Sky Drive is about to get better!Sailor2 picture

Talk about coincidence. A few days ago I needed to set up an Excel workbook to collect some basic information from several people scattered around the globe. We are working on a project involving the transfer and update of several hundred small documents from one World Wide Web site to a related but different site.  Because we need to make small changes to the documents in the process, they need us to work on them one at a time. The problem some of us saw, of course, was how to keep each other informed about which documents we were individually working on at the moment, which were completed, and which remained to be worked on and moved.

The tracking method had to be simple and accessible to all of us regardless of where we live in the world. Our timing is just a little off it seems because Office 2010 is in the wings, about to be released and it seems to me that and Access 2010 Web Application would be an excellent solution.

Two things prevented me from trying that approach, however. First, we needed to start the project sooner rather than later. Second, I am not up to speed with Access Web Applications yet. Fortunately, an alternate solution that we can apply in the meantime does exist: an Excel workbook hosted in Office Live Workspace.

Quote of the Day

Education is when you read the fine print. Experience is what you get if you don’t.

-Pete Seeger

Office Live has been available for several years. This service allows you to  store and share documents online. So once I had set up a workbook with the document lists for our team all I had to do was save the file to my Office Live account in a folder for the project. Then I used the sharing feature to add each of the team members as an editor for the project folder.

We have been using the workbook for several days now. To each of us, it appears that it ‘lives’ on our local system and that’s because we are doing the actual editing in our respective local Excel installations. Here’s how it works. John decides to work on document A. He goes into Excel and opens the Office Live workbook. If he isn’t logged into the Office Live account, he will have to enter his user name and password. Then except for a brief pause while the file downloads, the workbook opens in John’s copy of Excel.

He then finds the title of the document he intends to work with, marks an X in the In Progress column and closes the workbook. Of course he answers yes to the Save dialogue to save the document.

A few minutes later, as luck would have it, Mary decides to work on the same document that John is now working on. When Mary opens the Office Live workbook and finds the document title, she will see John’s X in the In Progress column. Knowing that someone else is working on the document, she can choose a different one and record that she is now working on that one.

Now, the coincidence that I mentioned at the beginning of this article isn’t about John and Mary deciding to work on the same piece at the same time. That’s a coincidence all right but an even more significant one happened for me this morning. I had already decided to write this article. Then in my email this morning I receive an RSS copy of this blog article from the Microsoft Office 2010 Engineering team, Accessing your Office files from any computer with Windows Live SkyDrive. This article links to a Excel oriented article, Collaborative Editing Using Excel Web App.

So it seems that the kind of document collaboration using Office Live Workspace that I had set up is about to get even simpler. I should explain that the Web App approach will be using SkyDrive, a Windows Live Service. The system I described uses Office Live Workspace. I have had both Office Live Workspace and SkyDrive accounts for some time but until now, I used the SkyDrive account simply for files that I wanted to make available for others to download. Soon, I will be able to use my SkyDrive for collaborative documents as well.

New at the Access Wiki

Access Wiki moderators are hard at work moving UA Forums FAQ and code archive content to the wiki. This will add many new articles to the Wiki’s growing content. There are some 850 code archive items alone. Since UA started in 2002 there have been more than 1,940,000 view and download of code archive content.

Quick Reference Guides for Office

I recently came across a site that offers free reference guides for Office and each of the Office applications. The guides are packed with shortcuts and other quick reference information. They are available for download in pdf format from FREE Quick References

Chart Intermittent Dates

Downturn  

Quote of the day

To become aware of the possibility of the search is to be onto something.

-Walker Percy

Natasha wanted to graph photocopier downtimes to show the duration of each downtime in minutes with data points labeled with the date of the down time incident. Her data list included the date of the copier needed service and the number of minutes it remained out of order. This seems simple enough but when she tried to generate a graph for the year, every day of the year appeared in the graph. That wasn’t quite what Natasha was looking for. She wanted to show only dates when there was copier downtime.

Graphing, it seems, assumes that if a series consists of date values then you want a date series showing every date between the first and last dates. Here you see the problem in the graph on the left, and a solution in the graph on the right. In the original data, the first entry is February 12 and the last, December 14. Notice how the graph is display dates from February 12 to December 12.

image

Because of the size of the graph, the labels display only one date for each of the eleven months.

The graph on the right, on the other hand, has data points only for each of the dates in its data series. (The size of the graph may cause alternate data points to be un-labeled, so the graph might need to be widened somewhat so that each data point has a label. You may also have to format the axis.) Because the X-Axis data is self-explanatory, I have removed the legend from both graphs.

The secret, to paraphrase Fried Green Tomatoes, is in the formula. Actually, it is in a function that the formula uses. TEXT() is a very versatile function, well worth adding to your Excel arsenal

In this example, I have used TEXT() to convert the date values in column B to text values that include the name of the weekday on which the date occurs.

The TEXT() function converts numeric values to text . It takes two arguments, a reference to a cell containing a numeric value and a string to indicate how the text should be formatted.

For example, the formula in cell J3 is:

=TEXT(B3, “ddd mmm dd”)

The format string here specifies that the text should begin with the three character abbreviation for the day name followed by a space, the three character abbreviation for the month name, another space, and finally a two digit number for the day.

There are many variations on the format string. Search the Excel help files for Text Functions or point your browser to Office On-line. The help article gives full details of how to specify the format string (the second argument of the function) depending on the numeric value you are trying to convert to text.

The point in this example is that by converting the dates in column B to text, and using the data in column J for the series labels, we can fool Excel into displaying date without having it automatically treating the dates a continuous series from the earliest date to the latest date.

Thanks Natasha for raising the question.

 

Link Textbox Contents to Worksheet Data

Flying2

 

Quote of the Day:

Copy from one, it’s plagiarism; copy from two, it’s research.

–Wilson Mizner

I tried a little experiment yesterday and was pleasantly surprised by the results. A while back I had learned how to link a chart title to data stored in an Excel worksheet. That in itself is an enhancement to charting.

If you have done any charting (graphing) in Excel, you will know that most of the chart’s values are stored in a worsales graphksheet. Change the worksheet values, and the chart will automatically update. Here’s an example. Let’s say that I am using a worksheet to prepare a monthly sales presentation to management. Management want to see the relative contribution of each salesperson to year to date sales. So I have set up a simple pie chart to display the information. Obviously, I have much more to do in my job than just to prepare this once a month presentation so I want to produce this chart as efficiently as possible.

Now, when I created the chart, using the chart wizard, I had to ‘hard code’ the title. That means that each month after I have updated the underlying date, I have to manually edit the chart title so that it reflect the reporting month. That takes a minute or two and for me it’s easy to forget. Forgetting to change the title costs more time. I have to re-open the file and make the change. Notice how the chart title at the moment is simply, “YTD Sales,” not reflecting the fiscal period.

To keep management of this chart as simple and efficient as possible I want to enter data only into the five cells that are highlighted in yellow. Of course the sales figure cells could actually be getting their values from formulas referring to the raw data. Then all I would have to do is enter the period ending date (and even that cell could contain a formula referring to the raw data.)

image

Here I have made one small change. The textbox containing the chart title no longer contains literal text. I have replaced the literal text with a formula that refers to a cell  containing the title exactly as I would like to see it in the chart. Now, regardless of the reporting date, the chart will always indicate the correct date.

These examples show an embedded chart. Having a date specific title is not as critical in embedded charts as it is in charts that are rendered on separate chart sheets in the workbook. In those cases, you can’t just glance at the data to see the reporting date  applicable to the chart without moving to the other worksheet.

The formulas revealed

The next graphic exposes the formulas involved. I have switched the worksheet to display formulas rather than the values generated by those formulas using ctrl+`. For this example, the sales results are simply random numbers because I don’t have any real data that can be published. The chart title text box contains a formula as well but it is still displaying the value rather than the actual formula which, in this case, is =$D$4. image

Cell D4 itself contains a formula that creates and formats the text I would like as the chart title.

Now you ask, why would I want to take the time to set this up when I could simply edit the title every month? For me it’s a no brainer. Yes, it took some time to set up – probably less than five minutes, to be honest with you. What is the payback on that investment of my time. Sure it is small but let’s say it takes me 1-1/2 to 2 minutes each month to edit the title. In the first three months I have more than recovered my time investment.Then there is the intangible benefit of saving me the embarrassment of forgetting to change the title or occasionally misspelling something in the title. Besides, I just think this is a cool possibility.

Remember One Trickimage

The is just one small thing to remember when you want to try this yourself. Ordinarily, when you want to enter a formula you select a cell and then type the formula in either the cell or the formula bar.  When you want to enter a formula in a chart title text box, select the textbox but do not type anything in it; when you have the textbox selected, type the formula in the formula bar.