Validation to Give Suggestions on Error

breynolds0431

Active Member
Joined
Feb 15, 2013
Messages
303
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a workbook which requires the user to typein a county name. There is then a vlookup that returns the urban/rural designation based on that county name. I was wondering if there was a way, when the county name was entered incorrectly and results in an error, for a form to pop-up with suggestions from the vlookup array to show and let the user select a county with a name close to what the user entered.

Thank you for looking at my question.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hello,

From your post I gather that there is list of countries somewhere your your workbook?
Maybe Data Validation as a list would help you with it? Users would have a list of countries to choose from, eliminating a risk for mistype?

1) Select desired cell (or cell range) you want to set data validation.
2) Go to Data Validation.
3) In a first field select List
4) In a Source field select cell range containing a list of countries
5) Leave other options as they are
6) Click OK.

In a cell you will have small arrow button. After you click it you will see a list of countries. Just scroll through a list to find a desired country and click on it. This feature will also check if a user tries to type something which isn't on that list. If yes then excel will popup a warning and block saving a new value in this cell.

Nard
 
Upvote 0
Hi Nard -

Thank you for the suggestion. At first I wanted to steer clear of drop-down validations due to the county listing including all US counties. Using the drop-down scroll would become tedious with the massive county listing. However, I noticed that you could use the list validation without including the in-cell drop-down. I think this might be the best route as the user can type the county directly in without worrying about case-sensitivity. I thought I remembered drop-downs or list validations would auto-complete as the user typed in the cell. But that doesn't seem to be the case, unless you are aware of anything else.

Again, thank you for the response.
 
Upvote 0
If you have a large list and you would like the list to narrow down as you type, have a look here.
 
Upvote 0
Using the drop-down scroll would become tedious with the massive county listing
How many item in the list are we talking about? more than 2K?
I suggest to use combobox (put in the sheet not in a form). And you can create a macro to make the combobox behave like this:
when you type "ham" it will show Hamilton, Hampton, Hammond etc, so you can pick one of them.
 
Upvote 0

Forum statistics

Threads
1,215,788
Messages
6,126,907
Members
449,348
Latest member
Rdeane

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