Thread: Macro help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Macro help

Copying is simple

Range("P5").Copy Range("E11")

etc.

Getting an answer is a tad ambiguous, it could be just summing, maybe
multiple, but you don't need to put in cells, you can do it in the macro

Range("S5").Vale = Application.SUM(Range("P5:R5")

etc.

Do you want to loop through all cells in column P and load S accordingly?

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"NICK" wrote in message
...
I have a spreadsheet where have a set model and then I have three columns

of
variable data. The three variables need to be put into the designated

input
cells for the model to produce an answer. I need some help writing a

macro
which takes the three variables in one go and copies the values into the
correct cells, then copies the answer into a fourth column next to the
variables, then the macro should move down a row and repeat with the new
variables from that row.

For example, copy P5 into E11, copy Q5 into E14, copy R5 into E19 the take
the answer from cell E20 and paste into S5, then drop down so that copy P6
into E11, copy Q6 into E14, copy R6 into E19 the take the answer from cell
E20 and paste into S6 - repeat down to row 2000.

Any help would be greatly appreciated!
Thanks in advance
Nick