if search

J

Jase

I want to be able to do some sort of "If Search" that will allow me to to
change my search criteria. For example if I specify that I want the data in
the 5 column of my data table below it will grab that data below it through
some kind of if link. SO if in a cell i type 4, below it in the next rows it
will give me the data of the 4th point.

Any idea if that is possible or if I am even making any sense?

1 2 3 4 5

..2 .3 .1 .3 .6
..4 .2 .8 .4 .7
..9 .7 .1 .2 .8

thanks,

Jase
 
P

Pete_UK

Assuming that data occupies A1:E5, and that you want to use G1 to
select the column number, enter this in G3:

=IF(ISNA(MATCH(G$1,A$1:E$1,0)),"",INDEX($A3:$E3,(MATCH(G$1,A$1:E
$1,0)))

then copy this into G4 and G5. This would work for any identifier in
A1:E1 and G1.

A slightly simpler version would be:

=IF(OR(G$1<1,G$1>5),"",INDEX($A3:$E3,G$1))

Hope this helps.

Pete
 
J

Jase

That is helping but I forgot that i may not be looking for exact matches.
What I enetered 2.6, I would want it to return the closest data match in this
case being 3.

Any help on that?

thanks,

Jase
 
P

Pete_UK

Okay then, you could do this:

=IF(OR(G$1<1,G$1>5),"",INDEX($A3:$E3,ROUND(G$1,0)))

Hope this helps.

Pete
 
Top