Learning path · Level 4 · Tutorial 2

Restrict Entries with Data Validation

Control new entries in an Excel or Calc sales register with category dropdowns and numeric limits. Configure helpful messages, test accepted and rejected entries, and recognize why validation does not replace checks of existing or pasted data.

  • Level: Intermediate
  • Duration: 15 min
  • 7 steps
Start tutorial Back to the path
Restrict Entries with Data Validation

Step 1 of 7

Identify the Cells to Control

See the worksheet as separate areas

Validation has a limited scope

Data validation is an entry control: it applies a validation rule to cells you select when values are entered or changed. It is not a general data-cleaning tool and does not repair all content already stored in a worksheet.

This practice sheet has separate roles:

  • the sales register, where planned entries belong;
  • a short source list of permitted category values;
  • an existing-value test already inside the register; and
  • an unvalidated paste source for a later check.

When you configure rules later, use Data > Data Validation in Excel or Data > Validity in Calc. These are corresponding controls, but a rule affects its selected target cells—not headers, source cells, or the whole worksheet.

Separate worksheet areas

A worksheet diagram showing distinct zones for a sales register, a short source list, and a paste-test area.

Keep register entries, permitted-value sources, and test cells separate.

Enter the fixed practice data

Build the practice sheet

Create a local workbook named ValidationPractice.xlsx in Excel or ValidationPractice.ods in Calc. Rename the worksheet Sales.

Enter the required values below exactly. Keep the starter record in row 2. Leave other register cells empty, except for Other in B9. Do not apply any validation rule yet.

B9 deliberately contains an existing value before rules are created. J2 is deliberately unvalidated so it can be copied in a later paste test.

Required worksheet contents

Enter these values on the Sales worksheet.

All listed values are part of the same local practice sheet.
CellsValuesPurpose
A1:D1Sale ID | Category | Quantity | Unit PriceRegister headers
A2:D2S001 | Books | 2 | 12.50Starter record
B9OtherExisting-data test
H1:H4Category Options | Books | Stationery | AccessoriesCategory source area
J1:J2Paste source | OtherUnvalidated paste-test area

Mark the future entry areas

The planned entry coverage is deliberately limited: Category entries will use B2:B10, Quantity entries will use C2:C10, and Unit Price entries will use D2:D10.

A1:D1 contains labels, not entries. The contiguous, nonblank source list is H2:H4; its Category Options heading in H1 is not a permitted value. Keep the source list and paste-test area outside the future validation targets.

Tip

Preserve the deliberate test values

Save the workbook locally before continuing. The value in B9 and the value in J2 must remain Other; they serve different tests later in the tutorial.

Check your worksheet map

Check your worksheet map

Use the sheet you created to identify the role of each area. Match every worksheet reference to its purpose. Focus on the difference between cells that will receive new register entries and cells that only supply labels, values, or test data.

Match areas to purposes

Match each worksheet area to its role in the practice sheet.

Tap an item and then its matching pair.

Step 2 of 7

Create the Category Dropdown

Create a category dropdown from the permitted values on the Sales worksheet and verify that it covers the intended entry range.

Locate the two ranges

Map the target and source

A category dropdown has two separate parts:

  • The target cells receive the validation rule: B2:B10.
  • The source list supplies the permitted choices: H2:H4.

H1 is only the heading, Category Options, so it is not part of the source. Keep the existing test value in B9 unchanged for now.

The rule belongs to the selected target range. It does not automatically extend to a later row such as B11.

How the dropdown is connected

Diagram showing H2:H4 as the category source list feeding a dropdown applied to B2:B10, while H1 is excluded.

The source list and the cells that receive the rule have different roles.

Configure the rule

Apply one list rule to the entry range

Select B2:B10 before opening the validation command. Then create one validation rule that points to the source list on the same Sales worksheet.

In Excel, use Data > Data Validation. In Calc, use Data > Validity. Keep the selection-list option enabled so users can choose a category instead of remembering every permitted value.

Excel and Calc settings

Configure the equivalent settings for your application. The source starts at H2 and ends at H4; do not include the heading in H1.

Use the application-specific labels, but the same source list.
ApplicationOpenAllow settingSource referenceDisplay setting
ExcelData > Data ValidationList=$H$2:$H$4In-cell dropdown
CalcData > ValidityCell range$H$2:$H$4Show selection list

Check the range references

Distinguish targets from sources

Match each spreadsheet role to its cell reference.

Tap an item and then its matching pair.

Verify a later target cell

Test the dropdown across the range

Now complete the practical check in your own workbook:

  1. If needed, apply the category validation rule using the settings from the previous screen.
  2. In B3, choose any permitted category from the dropdown; do not type a new category.
  3. Select B10 without changing its value. This later cell is still inside the target range.

Use the response to record what you observed.

Confirm the working range

Which category did you select in B3, and did B10 display the category dropdown when you selected it?

Write at least 20 characters (0/20).

Step 3 of 7

Set Quantity and Price Limits

Apply inclusive whole-number and decimal validation rules to the Quantity and Unit Price columns in the Sales register.

Choose the appropriate numeric criterion

Two numeric rules, two purposes

Quantity and Unit Price need different validation rules. A whole-number rule accepts integers only; a decimal rule accepts any numeric value within its limits, including an integer-valued price.

For this register, Quantity must be from 1 through 100. Unit Price must be from 0.01 through 1000.00. In a Between rule, both endpoints are included.

Cell formatting is separate from validation. Displaying two decimal places can make a value appear as 2.00, but it does not limit the allowed range or require exactly two decimal places.

Whole numbers and decimals

A spreadsheet diagram contrasts a Quantity column restricted to whole numbers with a Unit Price column that can contain whole or fractional numeric values within its range.

The validation criterion must match the meaning of the field: countable quantities use whole numbers, while prices can use decimal values.

Rule summary

Apply a separate rule to each target range.

Both rules use an inclusive Between condition.
FieldTarget rangeCriterionMinimumMaximum
QuantityC2:C10Whole number1100
Unit PriceD2:D10Decimal0.011000.00

Configure and prepare the allowed endpoints

Apply the two validation rules

Configure the Quantity rule first.

  1. Select C2:C10.
  2. In Excel, open Data > Data Validation. Set Allow to Whole number, choose Between, set Minimum to 1, and set Maximum to 100.
  3. In Calc, open Data > Validity. Set Allow to Whole Numbers, choose the between condition, set the minimum to 1, and set the maximum to 100.

Then configure the Unit Price rule.

  1. Select D2:D10.
  2. In Excel, open Data > Data Validation. Set Allow to Decimal, choose Between, set Minimum to 0.01, and set Maximum to 1000.00.
  3. In Calc, open Data > Validity. Set Allow to Decimal, choose the between condition, set the minimum to 0.01, and set the maximum to 1000.00.

Do not change blank-entry, input-guidance, or error-alert settings yet; those settings are configured in later steps.

Example

Prepare the boundary check

Keep the starter record in row 2 unchanged. After both rules are in place, use empty cells for a boundary check:

  • Enter 1 in C3 and 100 in C4.
  • Enter 0.01 in D3 and 1000.00 in D4.

Each value is permitted because Between includes the minimum and maximum. A price such as 0.125 can also satisfy the decimal rule: the rule controls numeric range, not the number of decimal places. Save the workbook after configuring the rules.

Boundary practice

Apply and verify the numeric rules

Complete the four boundary entries specified on the preceding screen after configuring both validation rules. Then report whether each entry was accepted, name the criterion used for Quantity and for Unit Price, and explain why a fractional Quantity is outside its rule while a fractional Unit Price can be permitted.

Write at least 120 characters (0/120).

Step 4 of 7

Guide Entries and Block Invalid Typing

Add field-specific entry guidance and Stop alerts so invalid manually typed values are rejected.

Show help at the right time

Two moments of help

Guidance appears before data is entered: in Excel, use an Input Message; in Calc, use Input Help. When a user selects a controlled cell, the message should say what that field accepts.

This is different from an error alert. An error alert appears only after someone tries to enter a value that violates the validation rule. Use guidance to prevent uncertainty before entry.

A comparison between a guidance callout displayed when a spreadsheet cell is selected and a blocking alert displayed after invalid typing.

Guidance helps before entry; a blocking alert responds after an invalid entry attempt.

Tip

Write guidance that answers the immediate question

Keep each message short and specific to its field. A category message should name the permitted categories; a quantity message should state that only whole numbers within its limits are accepted; a price message should state its numeric range.

A dropdown helps users choose a category, but it does not by itself demonstrate that manually typed text is rejected.

Pair clear messages with Stop

Configure the guidance and alert

Edit the existing rules for the three target ranges. In Excel, select a target range and open Data > Data Validation. On Input Message, show the message; on Error Alert, enable the alert and choose Stop.

In Calc, select a target range and open Data > Validity. Use Input Help for the guidance and Error Alert for the rejection message; enable the error alert and set its action to Stop.

Apply the matching messages below to B2:B10, C2:C10, and D2:D10. Use the same titles for every field: Entry guidance and Invalid entry.

Message text to enter

Use these field-specific message bodies. The validation criteria themselves remain unchanged.

Use the shared titles `Entry guidance` and `Invalid entry` with the matching bodies below.
Target rangeEntry guidance bodyInvalid entry body
B2:B10Choose Books, Stationery, or Accessories.Choose a category from the permitted list.
C2:C10Enter a whole number from 1 through 100.Enter a whole number from 1 through 100.
D2:D10Enter a number from 0.01 through 1000.00.Enter a price from 0.01 through 1000.00.

Warning

Choose a blocking alert

Stop is the blocking choice: it rejects an invalid manually typed value. Warning and Information can allow a user to continue after a prompt, so they are not equivalent to Stop.

Distinguish guidance from enforcement

Check the blocking setting

Which setup is required to reject an invalid value that someone types manually into a validated cell?

Apply and test the controls

Test typed entries and diagnose the result

On your own Sales sheet, finish the Entry guidance messages and Invalid entry Stop alerts for B2:B10, C2:C10, and D2:D10.

Then type Other into B3 and 101 into C3; confirm each attempted entry. Report whether each value was retained. If either value was retained, identify the validation dialog tab and control you would inspect to find the cause.

Write at least 80 characters (0/80).

Step 5 of 7

Set Blank-Entry Expectations

Configure blank-entry expectations without treating validation as a guaranteed completeness check.

Understand the blank-entry expectation

Blank is not the same as complete

For a completed sales record, Category, Quantity, and Unit Price are expected to contain entries. The blank-entry option in each validation rule expresses that expectation: clear Excel’s Ignore blank or Calc’s Allow empty cells.

This setting affects how an empty entry is treated during validation. It does not turn validation into a complete required-field system. A planned future row may remain empty, while a record that has been started but is missing a field still needs review.

Two kinds of empty rows

A spreadsheet diagram contrasts a complete record, a partially filled record with missing fields, and an untouched empty future row.

An untouched future row can be blank. A partly completed record with missing entry fields needs a separate completeness check.

Configure all three rules

Turn off the blank allowance

Update the existing validation rules; do not create different limits or change their source ranges.

For each target range, select the range and open the rule settings:

  • Excel: Data > Data Validation → Settings → clear Ignore blank.
  • Calc: Data > Validity → Criteria → clear Allow empty cells.

Keep the list source, numeric limits, Entry guidance, and Stop alert configured earlier. Applying this setting does not fill existing empty cells or automatically flag them immediately.

Ranges to update

Apply the blank-entry expectation separately to each existing rule.

Each range keeps its own validation criterion.
FieldTarget rangeCompleted-record expectation
CategoryB2:B10A category is entered
QuantityC2:C10A quantity is entered
Unit PriceD2:D10A unit price is entered

Check your interpretation

Interpret a missing alert

True or false: If you clear a validated cell and no Stop alert appears, the field is definitely optional and the required-field expectation is enforced.

Practice and report

Test clearing a temporary entry

On the Sales sheet, turn off the blank allowance for the existing rules in B2:B10, C2:C10, and D2:D10 using your application’s setting.

Then use B4, which has not been used in the earlier tests: enter a permitted temporary category, clear it, and move to another cell. Leave B3 unchanged, and preserve B9 and J2 for their later tests.

In 2–4 sentences, report what happened when you cleared B4. State why that observation does not mean a missing field is optional or that validation guarantees a completed record.

Write at least 120 characters (0/120).

Step 6 of 7

Test Boundaries, Existing Values, and Pasting

Test inclusive numeric boundaries, distinguish pre-existing invalid data from rejected typing, and compare values-only and ordinary paste behavior.

Check endpoints and out-of-range values

Reuse the existing endpoint entries

The accepted endpoint entries from the earlier numeric-rule step already occupy C3 (1), C4 (100), D3 (0.01), and D4 (1000.00). They are not new empty cells. In Step 4, the rejected attempt to type 101 into C3 should have left its earlier value of 1 unchanged.

Reuse those four cells: confirm their displayed values, then retype each endpoint once to test accepted manual entry. Use the still-empty cells C5:C7 and D5:D6 for the representative invalid entries. Record what happens after each attempt; dismiss a Stop alert rather than trying to force an invalid value into the cell.

Read the boundary pattern

The green range includes both endpoints. Values below or above it fail; a fractional value also fails the whole-number Quantity rule.

Diagram comparing an inclusive whole-number quantity range with an inclusive decimal price range, including rejected values outside each range.

Test the two ends of each permitted range, then values just outside it.

Boundary test matrix

Retype or enter one value at a time. The accepted endpoints confirm that Between includes its limits. The invalid attempts test a value below the limit, a value above it, and—only for Quantity—a non-integer value.

Expected behavior assumes the validation rule and Stop alert from earlier steps are still enabled.
CellFieldActionExpected result
C3QuantityRetype 1Accepted
C4QuantityRetype 100Accepted
C5QuantityType 0Rejected
C6QuantityType 101Rejected
C7QuantityType 1.5Rejected
D3Unit PriceRetype 0.01Accepted
D4Unit PriceRetype 1000.00Accepted
D5Unit PriceType 0Rejected
D6Unit PriceType 1000.01Rejected

Separate existing values from new typing

Inspect the pre-existing value

Other was placed in B9 before the category validation rule was applied. B9 is now inside B2:B10, but applying a validation rule does not go backward and repair, remove, or reject content that was already stored. Inspect B9 now: it can still contain Other even though that value is not in the category source list.

This is a different observation from a rejected typing attempt. A Stop alert controls a new attempted entry; it does not prove that every existing cell already meets the rule.

Why the existing value remains

A rule can cover a cell without automatically changing a value that was present before the rule.

Diagram of a highlighted category validation range containing one pre-existing invalid cell beside a separate permitted-value source list.

B9 is in the target range, but its earlier value is not automatically corrected.

Warning

Important distinction

Do not treat a visible dropdown or a selected validation range as evidence that all stored data is valid. Keep B9 unchanged until the final cleanup in this step, so it remains evidence of the existing-data limitation.

Test pasting and rule survival

Compare two paste methods

Pasting is a separate test from typing. Copy Other from the unvalidated source cell J2 and compare two methods in B10.

First, use your application's Paste Special command to paste values only into B10. Reopen B10's validation settings and record both the visible value and whether the category rule remains.

Before the second test, clear B10. If the rule changed or disappeared, restore it first. Copy J2 again and use ordinary paste into B10. Reopen the settings again. Ordinary paste can transfer cell settings as well as a value. Values-only paste avoids copying the source cell's validation settings, but it does not guarantee that the pasted value will be checked.

Tip

Inspect and restore the destination rule

Select B10 and inspect its validation settings after each paste. The category rule to restore is:

  • Excel: Data > Data Validation; Allow: List; Source: =$H$2:$H$4
  • Calc: Data > Validity; Allow: Cell range; Source: $H$2:$H$4

Keep the selection-list option enabled. The settings dialog—not just the value visible in B10—shows whether the destination rule survived.

Warning

Do not infer the cause from the value alone

A pasted Other does not establish one universal paste behavior. It may mean that entry checking was bypassed, or that the destination rule was removed or changed. Inspecting B10 after each paste distinguishes those possibilities.

Practice: record evidence and clean up

Run, inspect, and restore the validation test

Complete the boundary matrix from the earlier screen, inspect B9, and run both paste tests in B10 in the stated order. For each paste, reopen B10's validation settings before moving on.

After recording your observations, restore the category validation rule in B10 if necessary. Clear the deliberate existing-data test in B9, clear B10, and clear all temporary numeric test cells C3:C7 and D3:D6. Keep the starter record in row 2, the category source list in H2:H4, and the paste source in J2 unchanged.

Write at least 220 characters (0/220).

Step 7 of 7

Complete and Verify a Controlled Record

Finish a valid sales record, verify the final validation configuration, and document the limits of entry controls.

Inspect the completed control system

Make the controls agree

A trustworthy sales row depends on several controls agreeing: the correct target range, the intended validation rule, useful guidance, and a blocking alert for invalid typing. A dropdown by itself is only one visible part of that system.

Before handing off the register, remove the deliberate test values from entry cells and inspect the three rules. Keep the source list in H2:H4 and the paste source in J2; those cells have different roles from the Sales entry area.

A final validation map

Diagram showing the category, quantity, and price target ranges, their source list, and a separate paste-test area.

Inspect the targets and their rules separately; a source list and a paste source are not entry targets.

Final configuration checklist

Use the relevant dialog to verify each selected range: Data > Data Validation in Excel or Data > Validity in Calc.

The endpoints are inclusive. Confirm the field-specific guidance and the blocking alert as well as the rule itself.
Target rangeValidation ruleCheck before handoff
B2:B10List from H2:H4Dropdown visible; Entry guidance; Invalid entry alert set to Stop
C2:C10Whole number: 1 through 100Entry guidance; Invalid entry alert set to Stop
D2:D10Decimal: 0.01 through 1000.00Entry guidance; Invalid entry alert set to Stop

Tip

Keep the limitation visible

Validation helps control a new entry. It does not prove that every value already in the sheet is acceptable, complete, or protected from every paste method.

Perform the final record and rejection check

Complete the controlled record

First clear the deliberate existing-data test in B9. If B10 contains a pasted test value, clear it too. Do not change the unvalidated paste source in J2. Reopen B10's validation settings and restore the category rule if an earlier ordinary paste changed or removed it.

Then complete row 5 exactly as follows:

  • A5: S002
  • B5: choose Stationery from the dropdown
  • C5: enter 12
  • D5: enter 3.75

Select B5, C5, and D5 to confirm that their field-specific Entry guidance appears. Inspect the rules to confirm the Invalid entry alert is enabled with Stop.

Run the final observed test

With 12 still in C5, temporarily try to replace it with 12.5. Confirm that the Stop alert rejects the fractional quantity. If the application leaves C5 unchanged, verify that it still contains 12; otherwise restore 12 yourself.

Leave row 5 valid. Save the local workbook as ValidationPractice.xlsx in Excel or ValidationPractice.ods in Calc. For your handoff report, use the blank or paste behavior you actually observed earlier—do not assume every application and paste method behaves identically.

Warning

Interpret the paste check

A values-only paste may avoid copying the source cell's validation settings, but it is not a promise that the pasted value will be checked. An ordinary paste can also alter the destination rule. Inspection after pasting is the evidence.

Document the handoff evidence

Final verification report

Submit a short handoff report based on the work you just performed. State whether the completed row was left valid; identify the three target ranges and their rules; confirm the observed guidance and Stop-alert behavior; confirm that the deliberate invalid test entries were removed; and describe one blank-entry or paste limitation you observed. Also confirm that you saved the workbook.

Write at least 250 characters (0/250).

Close the validation handoff

Summary

What you verified

  • A dropdown is reliable only when its source, target range, guidance, and blocking alert are configured together.
  • Whole-number and decimal limits must match the meaning of their fields and include the intended endpoints.
  • Testing shows whether a typed entry is rejected; existing values, blanks, and pasted values still require review.
  • Validation is an entry-control aid, not a complete guarantee of data integrity.

Step complete

Congratulations! You completed: Restrict Entries with Data Validation

You completed and verified a controlled sales record. Your register now has category and numeric entry controls, while your handoff notes preserve the limits that still need review.

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate