help with multiple function from drop down box

G

Guest

i have a drop down box with 3 items say A,B,C then i need the following to
operate from that single dropdown box as follows: (if A4=A then
A6=D9,B6=D10,C6=D11) (if A4=B then A6=D12,B6=D13,C6=D14) (if A4=C then
A6=D15,B6=D16,C6=D17) any ideas please
 
R

Roger Govier

Hi

One way, IF the entries in A4 are ALWAYS uppercase, A,B, or C

A6=INDIRECT("D"&9+3*(CODE(A4)-65))
B6=INDIRECT("D"&10+3*(CODE(A4)-65))
C6=INDIRECT("D"&11+3*(CODE(A4)-65))

Regards

Roger Govier
 
G

Guest

Hi,

A6: =IF($A4="A",$D9,IF($A4="B",$D12,$D15))

B6: =IF($A4="A",$D10,IF($A4="B",$D13,$D16))

C6: =IF($A4="A",$D11,IF($A4="B",$D14,$D17))

Regards,
Stefi

„bigdaddy3†ezt írta:
 
G

Guest

sorry roger when i used a,b,c it was just an example the actual item will be
say weekly,monthly etc. and if that code would do the job where would it be
put
 
G

Guest

Hi Stefi, that works fine thankyou .
--
BD3


Stefi said:
Hi,

A6: =IF($A4="A",$D9,IF($A4="B",$D12,$D15))

B6: =IF($A4="A",$D10,IF($A4="B",$D13,$D16))

C6: =IF($A4="A",$D11,IF($A4="B",$D14,$D17))

Regards,
Stefi

„bigdaddy3†ezt írta:
 
R

Roger Govier

Hi

No, I was basing it on you literally using A,B and C.
In which case as each of the cell values was being offset by 3,
dependent upon the lookup value, I was trying to avoid IF statements by
using the fact that CODE(A) is 65, B is 66 etc, hence taking away 65
would leave you with 0 1 or 2 to multiply by 3, giving D (9+3*0)=9,
(9+3*1)=12, and (9+3*2) =15.

It will not work in the scenario you describe, and I can see that Stefi
has posted you a correct solution with IF statements.

Regards

Roger Govier
 
G

Guest

hi roger
thanks for your input anyway.
--
BD3


Roger Govier said:
Hi

No, I was basing it on you literally using A,B and C.
In which case as each of the cell values was being offset by 3,
dependent upon the lookup value, I was trying to avoid IF statements by
using the fact that CODE(A) is 65, B is 66 etc, hence taking away 65
would leave you with 0 1 or 2 to multiply by 3, giving D (9+3*0)=9,
(9+3*1)=12, and (9+3*2) =15.

It will not work in the scenario you describe, and I can see that Stefi
has posted you a correct solution with IF statements.

Regards

Roger Govier
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top