ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Excel: The Basics of Data Validation and Conditional Formatting

Updated on November 5, 2015
Not so daunting
Not so daunting

Young Tom showed signs of entrepreneurial adroitness when he started a neat little sideline in his father’s general store. Tom had read in the local newspaper that a small chain of entertainment rental outlets that hired out console games had gone bust, and there was to be a fire sale of all stock. There was no such outlet in the area around Tom’s father’s store, so he went along to buy up as much of the stock as he could afford.

Tom arrived back from the sale with a van loaded with goods. He was delighted with his haul, and he immediately set about logging and numbering the titles on Excel. As the stock came from rental stores, the cases already had stickered numbers attached. In order to save time and effort, Tom decided to log the stock using these existing numbers.

Not long into his task, however, he came across a flaw in the plan. As the stock he bought had come from more than one outlet, some of the numbers on the cases were duplicated. It would be difficult to memorise which numbers had already been used, and stock items with identical numbers would cause no end of problems if they slipped through the net. Tom was faced with the prospect of starting from scratch, and applying fresh stickers and numbers to each item individually.

Data Validation

But Tom is a resourceful fellow, and he found a way around the problem. He used Data Validation to ensure unique values in a column. In doing this, Tom could get on with the task of entering the game details in Excel 2010 without having to worry about duplicate numbers. Under Tom’s instruction, this versatile application had effectively posted a bouncer at the door to stop gate-crashing duplicates from entering the column. Here’s how he did it – it’s a simple process, so you might like to try it yourself on a blank worksheet.

Tom will be entering the number of each game into column B. He clicks the header to select the entire column, and then clicks the Data tab on the ribbon. He selects Data Validation, and from the drop down menu, he clicks Data Validation again. A dialog box appears.

In the Settings tab, Tom clicks the Allow drop down arrow and he selects Custom from the list. A formula box appears, and into this, Tom types the following:


He clicks OK, and that is the job done. To be sure that all is correct, Tom deliberately tries to enter a duplicate value into column B, but he finds this impossible, and he is given the following message:

The value you entered is not valid

A user has restricted the values that can be entered into this cell.

Tom gets on with his data entry, and at the end of it all, he discovered that there were eleven duplicated numbers. Renumbering these was a lot easier than having to give fresh numbers to his entire stock, so Data Validation saved the day.

Can't go there
Can't go there

Conditional Formatting

Tom’s game rental sideline was a success, and it brought in a steady stream of cash. In order to maintain the flow, however, Tom became aware that he must buy in new releases to keep up to date. He hires out games from three different consoles, the Playbox, the WeeStation and the X-Drive, and he needs to know how well or otherwise each format is performing. To do this, he must keep a record of exactly how many rentals are taken out for each console.

Now Excel has a multitude of charts that could assist Tom in this task, but instead, he opts to create a chart using Conditional Formatting, which is technically not a chart at all.


Well, he was shown this trick back at college, and he is a sentimental soul.

Tom keeps track of his rental transactions by entering the figures into an Excel spreadsheet each Sunday evening. He uses Excel’s REPT function to create an at-a-glance bar chart that will show him how many times games from each console format have been hired that week. First of all, however, he must set up his basics. Again you might like to try this yourself.

The Formulae*

Column B is dedicated to the date, and column C lists the different game consoles. Column D is where it gets interesting, because this is where he will enter the number of game rentals for each console over the past seven days. To begin with, he enters the number of rentals into the following cells:

Playbox – D2 (18 Rentals)

WeeStation – D3 (33 Rentals)

X-Drive – D4 (27 Rentals)

In the cells immediately to the right of these values (Column E), Tom applies conditional formatting to convert his data into a chart. In cell E2, he types the following formula:


This is a fairly simple formula, so let us examine it.

Tom is telling Excel to repeat the character(s) within the speech marks by the value in the cell preceding it; in this case D2. The character that sits within the speech marks is an uppercase, sans-serif letter I (Arial), which is most visually suitable for this task, although just about any character could be used. For the other console formats, Tom will use the following formulae:

=REPT("|",D3) – in cell E3

=REPT("|",D4) – in cell E4


Finishing Touches

Tom then jazzed up his chart by adding a bright background colour. He did this by selecting the group of cells beneath the text, and then adding a fill colour. He also gave each bar its own identity by changing the font colours. Now when he wants to update his chart, he simply copies the one from the previous week, and pastes it below, leaving a separating gap of one row. All he has to do then is amend the date and enter the three values relating to that week’s rentals. Excel does the rest.

Tom can see at a glance that the WeeStation is outperforming the other two formats, and so he buys in more games for that console.

So as you can see, some of the terminology associated with Excel is not nearly as daunting as it sounds. Excel is a far more powerful application than the examples above demonstrate, but I hope this short tutorial has given you an idea of how Data Validation and Conditional Formatting are useful tools to have at your disposal.

*In all my years, I think this is the first time I have ever used the word ‘formulae’.


    0 of 8192 characters used
    Post Comment

    No comments yet.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)