View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
poppy poppy is offline
external usenet poster
 
Posts: 1
Default Excel Formula Paste

Hello

I am trying to copy a formula from one column to another, but the funn
thing is when I copy the formula to another column, the formula is no
updated in the new column. For example if I copy this formula from C
to E3

=B3/SUM($B$3:$B$11)

Code in VBA:


Code
-------------------
Range("C3").Select
ActiveCell.FormulaR1C1 = "=RC[-1]/SUM(R3C2:R11C2)"
Selection.AutoFill Destination:=Range("C3:C11"), Type:=xlFillDefault
Range("C3").Select
Selection.Copy
Range("E3,G3,I3,K3,M3,O3").Select
ActiveSheet.Past
-------------------


the code in E3 appears as: =D3/SUM($B$3:$B$11) instead o
=D3/SUM($D$3:$D$11) and G3 as: =F3/SUM($B$3:$B$11) instead o
=F3/SUM($F$3:$F$11) and so forth with other columns that I copy to.

Do you have any idea why?

Plz help if you do

Kind Regard

--
Message posted from http://www.ExcelForum.com