Validate two words from cell using two other columns Microsoft Excel

dskribow

New Member
Joined
Nov 21, 2015
Messages
12
I've got what's probably a simple question concerning Microsoft Excel 2013 that I just can't figure out the answer to.
I have cell A1 that contains a name in the form of two words, such as "Jane Doe".
In two separate columns, I have separate lists of first and last names.
Here's what it looks like:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">
</code>
ABC
1Jane DooeyJaneDoe
2JaneDooey
3JohnDooey
4JohnDoe

<tbody>
</tbody>
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">
</code>
Here's what I'm trying to do: I'm trying to set up a validation rule in A1 that dissalows entering a two -word name that doesn't match a combination of columns B and C on some row.

How can I accomplish this?
Any and all help is much appreciated.
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Ok, so, I've actually got another related question. How can I make this work in VBA?

Here's what I'm trying to do: WorksheetFunction.Index(Sheet2.Range("Customer_Table"), WorksheetFunction.Match(Sheet13.Range("C3"), Sheet2.Range("Customer_Table[FName]") & " " & Sheet2.Range("Customer_Table[LName]"), 0), 1)

I keep getting a typ mismatch error.

...any ideas?
 
Upvote 0
Here's what I'm trying to do:
Actually, you gave us some code that apparently doesn't do what you are trying to do. So how should we deduce what you are trying to do? ;)

How related to the previous question is this?
We haven't previously learnt what Sheet2 and Sheet13 are and what "Customer_Table" is. Whilst we can guess, it would be good to know for sure. Also, what is this code part of?

Are you trying to use vba instead of the built-in Data Validation? If so, how and why?

The more background & understanding we have, the better chance of getting to the best solution quickly.
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,802
Members
449,095
Latest member
m_smith_solihull

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