Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default ? Function to copy based on choice

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default ? Function to copy based on choice

On Apr 20, 4:40*pm, webels wrote:
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default ? Function to copy based on choice

On Apr 21, 12:13*am, Donald Guillett wrote:
On Apr 20, 4:40*pm, webels wrote:









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


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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ? Function to copy based on choice

On Apr 22, 4:55*pm, webels wrote:
On Apr 21, 12:13*am, Donald Guillett wrote:









On Apr 20, 4:40*pm, webels wrote:


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


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.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default ? Function to copy based on choice

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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default ? Function to copy based on choice

On Apr 24, 2:05*pm, Claus Busch wrote:
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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down list based on choice of another dropdown Amy Excel Discussion (Misc queries) 2 January 23rd 08 08:39 PM
Sorting based on Drop Down choice [email protected] Excel Discussion (Misc queries) 5 March 23rd 07 07:58 PM
Forcing value based on list choice?? Potoroo Excel Discussion (Misc queries) 2 July 11th 06 09:17 AM
Hiding rows based on choice in a listbox robhargreaves Excel Discussion (Misc queries) 1 July 24th 05 12:58 PM
How to sum a column based on the choice of autofilter? Mr.G Excel Programming 2 January 11th 05 04:23 PM


All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"