ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Functions or Formula (https://www.excelbanter.com/excel-discussion-misc-queries/244184-functions-formula.html)

tarheelrooster

Functions or Formula
 
I am looking for a function or a formula to: Cell D2 has a drop down list.
When I chose an item (word) in the drop down list, I wan another cell to show
a web address. Each word in D2 will have a different web adress that shows
up in the other cell (O4). Example: If DOG is in cell D2 I want www.dog.com
in O4. If cat is in cell D2 I want www.cat.com in O4

kassie

Functions or Formula
 
What you need to use is VLOOKUP.
You will need to create a list of all the possible words that can be entered
in D2, with the relevant web addresses next to it. I would name this range
Websites, or something similar.

Say you create this list in Sheet2, from A2:Bwhatever. Now, in O2, enter
the following formula:

=IF(D2="","",IF(ISERROR(VLOOKUP(D2,Websites,2,0)," Unknown",VLOOKUP(D2,Websites,2,0)))

You could of course use Data Validation in D2, to restrict input to only
those values contained in Sheet2!A2:Bwhatever, in which case you can remove
the second IF in the above formula.

--
HTH

Kassie

Replace xxx with hotmail


"tarheelrooster" wrote:

I am looking for a function or a formula to: Cell D2 has a drop down list.
When I chose an item (word) in the drop down list, I wan another cell to show
a web address. Each word in D2 will have a different web adress that shows
up in the other cell (O4). Example: If DOG is in cell D2 I want www.dog.com
in O4. If cat is in cell D2 I want www.cat.com in O4


Sean Timmons

Functions or Formula
 
in O4:

=IF(D2="","","www."&D2&".com")

"tarheelrooster" wrote:

I am looking for a function or a formula to: Cell D2 has a drop down list.
When I chose an item (word) in the drop down list, I wan another cell to show
a web address. Each word in D2 will have a different web adress that shows
up in the other cell (O4). Example: If DOG is in cell D2 I want www.dog.com
in O4. If cat is in cell D2 I want www.cat.com in O4


CM

Functions or Formula
 
try this:
create a lookup list in your worsheet that has the values to find: this one
is in x1:y2

X Y
dog www.dog.com
cat www.cat.com

then in O4, you will put the formula: =vlookup(d2,x1:y2),2)



"tarheelrooster" wrote:

I am looking for a function or a formula to: Cell D2 has a drop down list.
When I chose an item (word) in the drop down list, I wan another cell to show
a web address. Each word in D2 will have a different web adress that shows
up in the other cell (O4). Example: If DOG is in cell D2 I want www.dog.com
in O4. If cat is in cell D2 I want www.cat.com in O4


Sean Timmons

Functions or Formula
 
Come to think of it, you'll probably want to format as a hyperlink.

=IF(D2="","",HYPERLINK("www."&D2&".com"))

"tarheelrooster" wrote:

I am looking for a function or a formula to: Cell D2 has a drop down list.
When I chose an item (word) in the drop down list, I wan another cell to show
a web address. Each word in D2 will have a different web adress that shows
up in the other cell (O4). Example: If DOG is in cell D2 I want www.dog.com
in O4. If cat is in cell D2 I want www.cat.com in O4



All times are GMT +1. The time now is 04:40 AM.

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