PDA

View Full Version : scanning a column



blumfeld0
11-08-2007, 09:21 PM
Hi. I am trying to organize data and having some problems

Given:

Cell A1: 860

Column B Column C
860 .5
870 .6
880 .7
890 .8
900 .9
910 1

Desired Result:
I would like excel to look at the value in cell A1
Then scan all of column B for that value.
When it finds it, return the corresponding value in Column C
e.g.
Cell D1: .5
If it doesn't find it, return some kind of error message i.e "ERROR"

Is there a way to do this?
I tried vlookup and hlookup and countif but i can't seem to get it to work.

thank you in advance!

herzberg
11-08-2007, 10:02 PM
I think you can try something like this:

=IF(ISERROR(VLOOKUP(A1,B:C,2,FALSE)),"ERROR",(VLOOKUP(A1,B:C,2,FALSE)))

Put it in Column D and I think it should work; it did for me.

blumfeld0
11-09-2007, 08:00 AM
herzberg, thank you!
i had to play around with the command you gave me but i got it work in the end.

thanks again