? Function to copy based on choice

  • Thread starter Thread starter webels
  • Start date Start date
W

webels

Hi
I think a function would be able to achieve this but I am unsure where
to start

Say my data is in
Col A ColB
12
13 X
15

Someone chooses either 12, 13 or 15 by placing an "X" in B1,B2(in the
above case),or B3.
Whever the X is placed I woul like to copy the value to cell C2.

Is this possible.

Thanks
Eddie
 
Hi
I think a function would be able to achieve this but I am unsure where
to start

Say my data is in
Col A     ColB
12
13             X
15

Someone chooses either 12, 13 or 15 by placing an "X" in B1,B2(in the
above case),or B3.
Whever the X is placed I woul like to copy the value to cell C2.

Is this possible.

Thanks
Eddie

Have a look in the help index for MATCH and then incorporate into
INDEX
 
Have a look in the help index for MATCH and then incorporate into
INDEX

Thanks Don -

I used the following and it works perfect.


=INDEX($A$1:$A$3,MATCH(C5,$B$1:$b$3,0))

Putting the value “x” in C5 and the formula in d5 I can place an x in
B1 or B2 or B3 and match the value.
I’m guessing there is no way to allow any character be placed in B1 or
B2 or B3 other than x and still return the values (allowing for users
who fail to use “x” as instructed)?
All the best
Eddie
 
Thanks Don -

I used the following and it works perfect.

=INDEX($A$1:$A$3,MATCH(C5,$B$1:$b$3,0))

Putting the value “x” in C5 and the formula in d5 I can place an x in
B1 or B2 or B3 and match the value.
I’m guessing there is no way to allow any character be placed in B1 or
B2 or B3 other than x and still return the values (allowing for users
who fail to use “x” as instructed)?
All the best
Eddie

Try using data validation on Column B, restricting the input to an
"X". If any other text is input, an error message appears. That error
message can be customized to explain that an "X" is needed.
 
Hi Eddie,

Am Fri, 22 Apr 2011 13:55:59 -0700 (PDT) schrieb webels:
I?m guessing there is no way to allow any character be placed in B1 or
B2 or B3 other than x and still return the values (allowing for users
who fail to use ?x? as instructed)?

for any character:
=INDEX($A$1:$A$3,MATCH("*",$B$1:$B$3,0))


Regards
Claus Busch
 
Hi Eddie,

Am Fri, 22 Apr 2011 13:55:59 -0700 (PDT) schrieb webels:


for any character:
=INDEX($A$1:$A$3,MATCH("*",$B$1:$B$3,0))

Regards
Claus Busch

HI Claus
Thanks for you suggestion.

I slightly changed what you suggested to

=INDEX($A$1:$A$3|MATCH("*"|$B$1:$B$3|0))

It kinda worked however it gave me the value in A1 even when no
character was inserted.
It seems that the "*" also allows for a blank entry.

Thanks
Eddie
 
Back
Top