ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   filling in data automatically (https://www.excelbanter.com/excel-discussion-misc-queries/181038-filling-data-automatically.html)

Kevin

filling in data automatically
 
Hello, I have sheet1 that contains names and addresses. On sheet2 I made a
drop down box to choose any of those names. Is it possible to have the
correct address fill in automatically in the cell next to the one the name is
in ? Thanks for any help, -Kevin

Max

filling in data automatically
 
Assuming Names n Addresses are listed in Sheet1's cols A and B
In Sheet2,
Assuming the DV to select the name is in A1 down
In B1, copied down: =IF(A1="","",VLOOKUP(A1,Sheet1!A:B,2,0))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kevin" wrote:
Hello, I have sheet1 that contains names and addresses. On sheet2 I made a
drop down box to choose any of those names. Is it possible to have the
correct address fill in automatically in the cell next to the one the name is
in ? Thanks for any help, -Kevin


Dave Peterson

filling in data automatically
 
If the names are unique, you could use =vlookup() to retrieve the values from
Sheet1.

=if(a2="","",vlookup(a2,sheet1!a:e,2,false))

This will look at the value in A2. If it's empty (no choice has been made),
it'll return "" (a cell that looks empty).

If there's a value in A2, it'll look at column A of sheet1. It'll return the
second column in the A:E range (column B) for the first match in column A.

Debra Dalgleish has lots of notes on =vlookup():
http://www.contextures.com/xlFunctions02.html (for =vlookup())

And you may want to use data|validation to restrict the values to just names in
your list (column A in my sample formula).

Debra Dalgleish has notes starting he
http://contextures.com/xlDataVal01.html

Kevin wrote:

Hello, I have sheet1 that contains names and addresses. On sheet2 I made a
drop down box to choose any of those names. Is it possible to have the
correct address fill in automatically in the cell next to the one the name is
in ? Thanks for any help, -Kevin


--

Dave Peterson

Kevin

filling in data automatically
 
Thank you both for the fast and informative responses, I really appreciate
it. Working great! -Kevin

"Dave Peterson" wrote:

If the names are unique, you could use =vlookup() to retrieve the values from
Sheet1.

=if(a2="","",vlookup(a2,sheet1!a:e,2,false))

This will look at the value in A2. If it's empty (no choice has been made),
it'll return "" (a cell that looks empty).

If there's a value in A2, it'll look at column A of sheet1. It'll return the
second column in the A:E range (column B) for the first match in column A.

Debra Dalgleish has lots of notes on =vlookup():
http://www.contextures.com/xlFunctions02.html (for =vlookup())

And you may want to use data|validation to restrict the values to just names in
your list (column A in my sample formula).

Debra Dalgleish has notes starting he
http://contextures.com/xlDataVal01.html

Kevin wrote:

Hello, I have sheet1 that contains names and addresses. On sheet2 I made a
drop down box to choose any of those names. Is it possible to have the
correct address fill in automatically in the cell next to the one the name is
in ? Thanks for any help, -Kevin


--

Dave Peterson


Max

filling in data automatically
 
Welcome, good to hear that.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kevin" wrote in message
...
Thank you both for the fast and informative responses, I really appreciate
it. Working great! -Kevin





All times are GMT +1. The time now is 06:05 AM.

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