Abstract

Transcript

In this video we’ll look at how to create a named constant.

This is a useful way to create a name that doesn’t appear in a cell on the worksheet.

Let’s take a look.

Let’s add aformulathat calculates sales tax.

One way to do this is toname a rangeon the worksheet, and use that name in the formula.

The formula is easy to read and the tax rate is easy to change.

But what if I don’t want the tax rate to appear anywhere on the worksheet?

Well, I couldmove it to another sheet, and even hide that sheet if I want.

But it’s also possible to name a constant directly with Excel’s Name feature.

First, I’ll undo the formulas and name that I created.

Next, I’ll create a new name called “tax_rate”.

For the tax rate, I can use a decimal value, or I can use a percent value.

You may want to add a comment to explain the purpose of this name.

Back in the worksheet, I can create the formulas as before using this new name.

With this approach, I don’t need the tax rate to appear anywhere on the worksheet.

This is probably not a technique you’ll use everyday.