Validation list driving macros

R

Risky Dave

Hi,

I have a column in a sheet each cell of which is populated from a validation
drop-down. The values of each cell are independent of each other, but are
selected from the same range of options.

What I would like to do is associate a macro with each validation option to
generate a different output per line according to what is selected in the
drop-down.

Eg - Column B is the validation, offering a choice of multiply by two or add
two. The macro output is produced in column C:

A B C
data 1 *2 2*(data 1)
data 2 +2 2+(data 2)
data 3 +2 2+(data 3)
data 3 *2 2*(data 3)

Any solutions would be much appreciated.

TIA

Dave
 
B

Barb Reinhardt

I'm not sure you need a macro for this

C2: =IF(B2="*2",2*A2,IF(B2="+2",2+A2))
 

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