Finding Function

T

Tony

Hi...him new over here.
I'm trying to build a function that finds a value and return the next cell value.

A B C
1 RED 50
2 BLUE 101
3 BLACK 230
4 GRAY 25
5

For example...if a run the function for "black" then it should return 230.
If i used it for blue then it should return 101.

Any help or ideas are welcome.Thanks in advance.
 
J

J.E. McGimpsey

One way:

Look at VLOOKUP in XL Help:

=VLOOKUP("RED", A:B, 2, FALSE) ===> 50

=VLOOKUP("BLACK", A:B, 2, FALSE) ==> 230
 
T

Tom Ogilvy

The vlookup function already does this.

see Excel help. You can use it in VBA as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top