Forum Discussion
Need to be able to type customer name in one field and the account number populates in another
I assume those are real names of real clients. You should take the images off your post (I can't do it for you).
From what you've said, it sounds as if one of the various functions (for looking up values related to account numbers or names) would be the answer to your implied question. Here's a link that explains the VLOOKUP function, one of the most widely used in Excel. On that page, you'll also find links to other related functions like INDEX and MATCH. If you need additional help in implementing a solution, please come back with a mockup (no real names please) of your workbook, and post that mockup spreadsheet, not just an image, on OneDrive or GoogleDrive, and post a link here that grants edit access to the sheet.
I've added the link to a test workbook. Please let me know what you think. I took a look at the VLOOKUP before I posted, but wasn't sure exactly what to do. Thanks so much.
- mathetesFeb 06, 2023Silver Contributor
I've attached your example with a formula in the column for Customer ID that looks up that number, based on the name. I used INDEX and MATCH because the way you are doing this would be considered by many IT professionals to be "backwards," in that you are using the name to find the ID. The ID is unique; names may or may not be unique; that's why it's "backwards" from the normal way of doing it.
But it gives you the idea of how that function works.
I took a look at the VLOOKUP before I posted, but wasn't sure exactly what to do.
What you should do in cases where you're being introduced to a new function is follow the examples and build your own. You'll learn better that way, even though it may take a little trial and error.
To save you the trouble this time, I've inserted a sheet that uses VLOOKUP as well as the one you've already created. In the process, using Customer ID as the operative argument, I realized that some of your IDs were entered as "text" and others as "numbers," which could mess you up. I'd recommend having IDs that can't be that ambiguous--and consistently using text is the more reliable. So add a meaningful letter or two at the start. For example, I made the IDs "CC1001", "CC1002" and so forth.