Vous êtes sur la page 1sur 8

4/3/2015 Business Analysis ­ Excel with Business

 DASHBOARD
 SUPPORT
ὐ ❓  
Balaji

COURSE
Validation of numbers and lists

Most business data is bounded by some constraints, and Data Validation helps you observe those
constraints when working with data in Excel. Data Validation thus helps you keep the data within your
SHOW SYLLABUS spreadsheets tightly controlled and, as a bonus, provides the user with guidance as to how they should
enter data into your workbook.
MODULES

✓✓✓✓
For example, in your business environment you might have the following constraints:

Team sizes limited to between four and twelve staff;

Working hours limited to between 8am and 6pm;

Parts for replacement only be available in 20, 25 or 30mm sizes;
Module Key

Interest rates only allowed to be between the daily cash rate and that rate +1%
Modules included

Modules excluded

✓ Modules completed Using Data Validation, you can stop people entering values into your workbook that sit outside of these


Current module constraints.

 For any cell, you can specify the type of validation you want. Listed below are some examples that would
enable us to ensure that only data consistent with the constraints listed above could be entered into our
worksheet:

Allowing numbers only within a specified range

Allowing dates or times only from within a certain timeframe

Allowing values only from a particular list

Allowing text only of a specified length

Using a formula to calculate what is allowed

Specifying whether or not a cell can be left blank

Data Validation also provides useful prompting to people entering data into a workbook, and the facility for
including explanatory notes and suggestions if the wrong data is entered.

Restricting worksheet inputs using Data Validation

To apply Data Validation to a cell,  first select the cell you wish to have validated, then click on the Data
Validation tab, Data Validation...:

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 1/8
4/3/2015 Business Analysis ­ Excel with Business

From here you can apply your desired Data Validation. For example, if you were doing a staff assignment
and the number of staff in the team must be between four and twelve, then Data Validation can be used to
restrict input.

 The Settings would be:

If you set the Input Message (highly recommended),

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 2/8
4/3/2015 Business Analysis ­ Excel with Business

then whenever that cell is selected on the worksheet, the Input Message will be displayed as a prompt:

Setting an Error Alert

It is highly recommended that you set an Error Alert:

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 3/8
4/3/2015 Business Analysis ­ Excel with Business

Whenever an incorrect value is entered, your error message is displayed and there is the opportunity to
show explanatory text:

Controlling Error Actions

It is important to be able to manage the type of restrictions applied to Error Alerts, so three levels of error
handling are provided under the Stop dropdown in the Data Validation window, Error Alert tab.

Stop: This means that the user can’t continue with the invalid data:

Warning: This gives the user the option to continue:

Information: This advises the user of the problem, but no action is taken:

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 4/8
4/3/2015 Business Analysis ­ Excel with Business

Limiting worksheet inputs to a list

A very useful technique is limiting data input by only allowing the user to pick valid entries from a list.  This
is used to limit selections to only a small number of allowed names or values.

For example, to restrict the input to one of only six valid investment types, first define a range anywhere in
the workbook named ‘AssetList’:

Then, in the target cell (i.e. where you need to restrict the data input), set up Data Validation using the
range name as the list:

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 5/8
4/3/2015 Business Analysis ­ Excel with Business

Use a range name (here ‘AssetList’) instead of D3:D8 for the Source of the list. T his improves auditability
and ease of making changes.

Now, whenever the target cell is selected, a dropdown menu with only the valid choices is displayed:

Cascading Data Validation

In some case with structured data entry, Data Validation can be set up to cascade through the data entry.
For example, imagine the instruction:

 'first select bonds or Equities, then select which particular bond or equity.

As shown in the example below, in the first box you can choose either Equities or Bonds (selected from
the range named ‘Titles’):

Then, depending on the contents of the first box:

If Bonds has been chosen, the list in range ‘Bonds’ is used for validation

If Equities has been chosen, the list in range ‘Equities’ is used for validation

This is referenced with the INDIRECT function, as shown below:

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 6/8
4/3/2015 Business Analysis ­ Excel with Business

Method in Action

04:10

Practice Task

Experience with developing Data Validations for numbers and list input. See exercise sheet 1.

 Download .xlsx file

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 7/8
4/3/2015 Business Analysis ­ Excel with Business

Synoptic Task

Generating a cascading Data Validation for two tiers of structured data. See exercise sheet 2.

 Download .xlsx file

PLEASE SELECT

I've completed this module I'll come back to it later I want to filter it out

https://excelwithbusiness.com/user/course/VpdPhXBFcm/946fDKkBpP/YtTpKgwDdJ 8/8

Vous aimerez peut-être aussi