View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Cordobes
 
Posts: n/a
Default Copy formulas via Code

I have a range with formulas on sheet2 called "database". I want to get this
range and transfer it's contents to sheet1 called "work", but I want the
formulas to update themselves to this new location, and not show the same
exact formula that was found in the original range. I had tried :

sheets("work").range("a1:b10").formula =
sheets("database").range("d1:e10").formula

with the following results

Cells d1 to d10 on sheet database contain X values, and cells e1 to e10
contain the formula =d1*d1, =d2*d2, and so forth.

What I obtain on cells a1 to b10 on sheet work is exactly the same formulase
outlined above ( ie : = d1*d2 ) instead of the formula getting updated to =
a1*a1, = a2*a2.

I don't want to use the copy paste method because it changes the sheet
selection and I have code written for the activate and deactivate events on
each of these sheets.

Any suggestions?