How to use VBA to copy selected data from one worksheet to another

D

dhunter43

I have successfully used the "IF" formula but need to expand beyond the
number of allowable nested arguments. The "LOOKUP" formula won't work because
I cannot ensure the user selections will be sorted. I've tried using "IFELSE"
in VBA but I don't understand how to properly write the conditions and the
only examples I can find aren't helpful.
Here is the scenario I'm working with.

I have 2 worksheets; InputForm and Formulas.
Range B14:b25 in the InputForm worksheet are drop down lists that deliver a
value in the corresponding range c14:c25.
Cells M1:AC1 in the Formulas worksheet are the same as the drop down list in
the InputForm worksheet. I need to populate cells M2:AC2 with the data from
InputForm C14:c25 based on user selection.
90% of the time there will be several cells left blank in InputForm b14:c25
and I would like to return a "0" in Formulas("M2:AC2") if an operation
isn't selected.

thank you,
dhunter43
The Performance Advantage, LLC
 
M

Michael

I think you can solve your problem without any code, if I understand it
correctly, You want a 0 in the range(MA2:AC2) when the user does not make a
selection in any of the dropdown boxes. So rather than directly sending the
result of their choices to the above mentioned range, send it to a "pivotal
range" for example (AC2:AU2) and in (MA:AC2) you setup a formula that reads
If(MA2="",0,MA2) and you drag it accross.

Mike Arch.

Please rate this posting if helpful.
 
D

dhunter43

I wish it were that simple. Based on user selections I need to transfer data
from 'InputForm' to 'Formulas'. The user has 12 opportunities to make
selections from the same drop down list. Based on their selections I need to
transfer the data from 'InputForm' range c14:c25 to 'Formulas' range m2:ac2
and I want a zero to appear in range m2:ac2 that wern't selected on the
'InputForm' worksheet.

I hope that wasn't too confusing.
 

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