ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trouble with VLookup (https://www.excelbanter.com/excel-programming/326983-trouble-vlookup.html)

RobG

Trouble with VLookup
 
I am trying to create a script that allows me to select one option from a
long pull down list and automatically insert the corresponding text from the
next column in the source data into another cell. (Select the company
description code from the pull down list and the description text appears in
the cell below). I think it should be easy, but I am a bit of a beginner in
this area and this one keeps defeating me!

I am using Excel 2003.

Tom Ogilvy

Trouble with VLookup
 
Why a script. Why not just use vlookup as a formula in a cell.

Assume the company name selected appears in B9

in a Sheet named data you have the company names listed in column A and the
description text in column B

in B10 you could have

=if(B9="","",Vlookup(B9,Data!A1:B200,2,False))

--
Regards,
Tom Ogilvy


"RobG" wrote in message
...
I am trying to create a script that allows me to select one option from a
long pull down list and automatically insert the corresponding text from

the
next column in the source data into another cell. (Select the company
description code from the pull down list and the description text appears

in
the cell below). I think it should be easy, but I am a bit of a beginner

in
this area and this one keeps defeating me!

I am using Excel 2003.




JulieD

Trouble with VLookup
 
Hi Rob

not sure what you mean about trying to create a script to do this ... i'm
interpreting "script" as "macro" ... so what exactly do you want to macro to
do, put the drop down list in a cell, create the VLOOKUP formula or do you
just want to use a VLOOKUP formula to achieve what you're after.

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"RobG" wrote in message
...
I am trying to create a script that allows me to select one option from a
long pull down list and automatically insert the corresponding text from
the
next column in the source data into another cell. (Select the company
description code from the pull down list and the description text appears
in
the cell below). I think it should be easy, but I am a bit of a beginner
in
this area and this one keeps defeating me!

I am using Excel 2003.




RobG

Trouble with VLookup
 
Hi Julie

I've just worked it out - I just needed a VLOOKUP formula to achieve what I
was after, but convinced myself that I needed to do something more
complicated as I could not get it to work. It turned out that what I really
needed to do was simplify my formula (the glitch was caused by
overcomplicated guidance in the book I was working from).

"JulieD" wrote:

Hi Rob

not sure what you mean about trying to create a script to do this ... i'm
interpreting "script" as "macro" ... so what exactly do you want to macro to
do, put the drop down list in a cell, create the VLOOKUP formula or do you
just want to use a VLOOKUP formula to achieve what you're after.

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"RobG" wrote in message
...
I am trying to create a script that allows me to select one option from a
long pull down list and automatically insert the corresponding text from
the
next column in the source data into another cell. (Select the company
description code from the pull down list and the description text appears
in
the cell below). I think it should be easy, but I am a bit of a beginner
in
this area and this one keeps defeating me!

I am using Excel 2003.





JulieD

Trouble with VLookup
 
Hi Rob

glad to hear you solved it!

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"RobG" wrote in message
...
Hi Julie

I've just worked it out - I just needed a VLOOKUP formula to achieve what
I
was after, but convinced myself that I needed to do something more
complicated as I could not get it to work. It turned out that what I
really
needed to do was simplify my formula (the glitch was caused by
overcomplicated guidance in the book I was working from).

"JulieD" wrote:

Hi Rob

not sure what you mean about trying to create a script to do this ... i'm
interpreting "script" as "macro" ... so what exactly do you want to macro
to
do, put the drop down list in a cell, create the VLOOKUP formula or do
you
just want to use a VLOOKUP formula to achieve what you're after.

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"RobG" wrote in message
...
I am trying to create a script that allows me to select one option from
a
long pull down list and automatically insert the corresponding text
from
the
next column in the source data into another cell. (Select the company
description code from the pull down list and the description text
appears
in
the cell below). I think it should be easy, but I am a bit of a
beginner
in
this area and this one keeps defeating me!

I am using Excel 2003.








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

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