ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel database (https://www.excelbanter.com/excel-worksheet-functions/27537-excel-database.html)

Missgabby22

Excel database
 
Im trying to create a new database in Excel and I would like to format it so
that when I type in a clients name, the rest of their information such as
address, phone number, and contact name will pop up automatically. Any
suggestions on how I can do this?

Mexage

Dear Missgabby22:

Ohh... This looks like a job for VLOOKUP!

The VLOOKUP function will efficiently search a table with sorted values.

The basic syntax is:

=VLOOKUP(LOOKUP_VALUE,LOOKUP_TABLE,COLUMN_NUMBER)

Instead of using the name though, I would recommend you to apply some sort
of ID to avoid duplicates. In VLOOKUP you need the LOOKUP_VALUE to be as
close as possible to the values in the first row of LOOKUP_TABLE.

If you still want to use the name, then I would recommend you to use the
Validation feature (under Data menu) to allow you to find a name in the list.

Example:
A B C
1 mexage Excel
2 missgabby22 Word
3
4
5 Name: mexage
6 Program: Excel

In this example, the lookup_table would be $A$1:$B$2, the lookup_value would
be B5 (in the cell B5 you type the name you want to lookup) and in B6 you
would type the following:

=VLOOKUP(B6,$A$1:$B$2,2)

The number two states that you need the number two column (that is the
program name instead of the actual name which is row 1)

There are some things you should consider:
1. This only works when the names are sorted in ascending order
2. It would be a nice idea to have the Lookup table in one sheet and the
lookup functions in another.
3. You could use named ranges for better readability.

Hope this helps; if it does, please rate my post.
G.Morales.

"Missgabby22" wrote:

Im trying to create a new database in Excel and I would like to format it so
that when I type in a clients name, the rest of their information such as
address, phone number, and contact name will pop up automatically. Any
suggestions on how I can do this?



All times are GMT +1. The time now is 10:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com