Fill a cell (text) based on another (text).

Solved
SOMUM Posted messages 28 Status Membre -  
SOMUM Posted messages 28 Status Membre -
Hello everyone,

I'm going to bother you again today with my report.

My question is simple (at least I think so).
I have a list of clients:
- Autocars truc
- Bidule Autocars
- ... etc

I have an address for each client (in list form):
- Pont de Ernest
- Chemin Départemental 6
- ... etc

I have a postal code for each client (in list form):
- 99548
- ... etc

My question is: If in D18 I retrieve the information of my client's name, I want in D19 their address, in E20 their postal code, and in M20 their city based on the lists of addresses, postal codes, and cities.
The list of clients is on the right side of the table.

https://www.cjoint.com/c/FDgjIfxjkKu

Configuration: Windows 7 / Chrome 49.0.2623.110 / Excel 2010

1 réponse

Arkana0 Posted messages 1980 Registration date   Status Modérateur Last intervention   183
 
Wouldn't the VLOOKUP() function solve your problem?
3
SOMUM Posted messages 28 Status Membre
 
It's a lead, I'll look into it :)

ps: I'm just starting with Excel!
0
Arkana0 Posted messages 1980 Registration date   Status Modérateur Last intervention   183 > SOMUM Posted messages 28 Status Membre
 
OK, so I'm going to go a bit further in my answer:

With a table whose columns are organized in the following order:
Customer name, address, postal code, city

By typing in D19:
= VLOOKUP(D18, The cells of the table defined above, 2, FALSE)

This will return the address of the customer specified in D18. To get the postal code and city, simply replace the 2 with 3 or 4 respectively. 1 returns the customer's name.

A few basic rules:
- The customer name must be the first column of the table in which you are going to perform your VLOOKUP(), all values in the previous columns will not be accessible.

- Be careful to specify the entire table where you want to apply your VLOOKUP(), if you enter 5 in my example, you will get a #REF error

- Make sure to specify "FALSE" at the end of the formula, otherwise the VLOOKUP may return information for Mr. MARTIN instead of Mr. MARTON (similar value)

- For it to work well, each customer must be unique. If you have two Jean MARTINs, the function will only return the information of the first one it finds in the list.
2
SOMUM Posted messages 28 Status Membre
 
IT WORKS!! (even though I had a hard time) Yayyy!
0