ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell value dependent on another cell entry (https://www.excelbanter.com/excel-discussion-misc-queries/38427-cell-value-dependent-another-cell-entry.html)

Ajay

Cell value dependent on another cell entry
 
Afternoon all
Having a senior moment in need of help.
I have created a list of names using data validation that works fine what I
need to do next is once a name is chosen automatically have their phone
number appear in the next cell. I am sure its possible so if you have any
ideas they would be much appreciated.
TIA
Ajay

bj

I assume you have a table with names and telephone numbers
in the cell where you want the number to appear try
=vlookup(name,Name-number-range,2,False)
Assuming the number is next to the name. In not the 2 needs to be adjusted.

"Ajay" wrote:

Afternoon all
Having a senior moment in need of help.
I have created a list of names using data validation that works fine what I
need to do next is once a name is chosen automatically have their phone
number appear in the next cell. I am sure its possible so if you have any
ideas they would be much appreciated.
TIA
Ajay


Dave Peterson

I'd put the phone numbers in the column to the right of the list of names.

Then you could use an =vlookup() formula to return what you want.

Say your data|validation cell is A1.
Your list of names/phone numbers is in sheet2!a1:B99.

Then you could use:

=if(a1="","",vlookup(a1,sheet2!$a$1:$b$99,2,false) )

Visit Debra Dalgleish's site:
http://www.contextures.com/xlFunctions02.html
for nice instructions.

Ajay wrote:

Afternoon all
Having a senior moment in need of help.
I have created a list of names using data validation that works fine what I
need to do next is once a name is chosen automatically have their phone
number appear in the next cell. I am sure its possible so if you have any
ideas they would be much appreciated.
TIA
Ajay


--

Dave Peterson

Ajay

Just the job Excellent!
many thanks bj and Dave
Ajay

"Dave Peterson" wrote:

I'd put the phone numbers in the column to the right of the list of names.

Then you could use an =vlookup() formula to return what you want.

Say your data|validation cell is A1.
Your list of names/phone numbers is in sheet2!a1:B99.

Then you could use:

=if(a1="","",vlookup(a1,sheet2!$a$1:$b$99,2,false) )

Visit Debra Dalgleish's site:
http://www.contextures.com/xlFunctions02.html
for nice instructions.

Ajay wrote:

Afternoon all
Having a senior moment in need of help.
I have created a list of names using data validation that works fine what I
need to do next is once a name is chosen automatically have their phone
number appear in the next cell. I am sure its possible so if you have any
ideas they would be much appreciated.
TIA
Ajay


--

Dave Peterson



All times are GMT +1. The time now is 02:04 PM.

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