Finding Function

  • Thread starter Thread starter Tony
  • Start date Start date
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.
 
One way:

Look at VLOOKUP in XL Help:

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

=VLOOKUP("BLACK", A:B, 2, FALSE) ==> 230
 
The vlookup function already does this.

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