Hi I want my code to do something like this:
If I type "Houston", "Dallas" or "Austin" in any row from colum A the same row in column B could be filled with "Texas"
Please Login or Register to view this content.
Hi I want my code to do something like this:
If I type "Houston", "Dallas" or "Austin" in any row from colum A the same row in column B could be filled with "Texas"
Please Login or Register to view this content.
Hi and welcome.
Are these the only place names you're interested in for this or are there many more?
The answer will dictate the best way to do this.
BSB
I will include seven States . Each one with 10 or more cities. Thanks!
Personally I would do this with a lookup formula such as VLOOKUP or INDEX/MATCH and have the list of cities and states stored in the workbook on a hidden sheet.
This would make changes to that list quicker and easier to make.
But if you want a VBA approach then the below in the worksheet module is one way:
Obviously you'll need to amend the cities and state names in this example and add more to cover all you're interested in for this but should be straightforward to follow.Please Login or Register to view this content.
BSB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks