Data Validation - Text in cell which contains words.

KyleJackMorrison

Board Regular
Joined
Dec 3, 2013
Messages
107
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
Hello,

I would like some sort of data validation, or vba code to stop people entering the wrong information.

I have a list of words which gets coloured in conditional formatting. Sometimes people put in the wrong words. For instance i have the word "Holiday" in conditional formatting turn red. So this would allowed "Easter - Holiday" "Holiday - Easter" any of those. I would like a sort of data validation to do that same to allow set words which are contained in a string.

Words:
".... Holiday"
".... Course"
".... Training"

TIA
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
@rpaulson

Thanks for your comment, i know that as i have that selected already. however i would like a data validation to stop people entering anything and limit it to what words i would like that are the words in conditional formatting.

I work with computer illiterate people who don't understand they need to enter the work "Holiday" in order for the cell to turn red. So data validation would pop up an error sign saying "Enter one of the following words: Holiday, Course" however i would like the word "Holiday" to allow text before or after it. So Text Containing in data validation.
 
Upvote 0
@rpaulson

Thanks for your comment, i know that as i have that selected already. however i would like a data validation to stop people entering anything and limit it to what words i would like that are the words in conditional formatting.

Rather than having the user type in the cell, you can create a list of options for a drop-down menu for them to choose from. That way there's no confusion.

I suggest opening a second sheet that will contain the list of options so that you can protect/hide this sheet to prevent other users from accidentally editing it. On the second sheet, type the options out one cell at a time.
https://imgur.com/OkICbJi

Now go back to your original sheet and select the cell that you intend to have the data validation applied to.
OkICbJi
OkICbJi
Open the Data Validation option and select "List" under the Allow: menu. Make sure that the "Ignore blank" and "In-cell dropdown" options are checked.
https://imgur.com/iOdkQlV

You can then either click on the up-arrow for the Source, click Sheet2, select the range and click the return key to generate the source or you can type the formula directly into the Source field.
(Clicking the up-arrow option)
1) https://imgur.com/yMlucem
2) https://imgur.com/PTFT5M9

(Typing formula directly)
https://imgur.com/XvJXePg

Once the Source field is filled out, click the OK button.

When you go back to the original sheet you should see a drop-down arrow for that cell.
https://imgur.com/RKvwPht

Now you can copy/paste this cell to as necessary.



Hope this helps!
 
Upvote 0
@garden Utopia,

Thanks for the reply! I have actually tried this however its a very fluid document. For instance The word "Holiday" is the pro-word here which gets coloured. I use the document as a weekly tracker. So many people input the word "Holiday" followed by there location, so i won't be able to list these as there are many many possible outcomes.

Data validation looks like it would work but just need it to recognise Text Contains so i can make it work.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top