copying down formula not working

jam1531

New Member
Joined
Jan 5, 2015
Messages
29
Hello,

Any help appreciated. The below code works fine EXCEPT when it goes down multiple rows it seems to just copy the first cell down multiple times. My guess is that although [FONT=&quot]Range("x11") is anchoring or in other words not moving to the new cells as it goes down, causing the problem.[/FONT]


Code:
[COLOR=#1A1A1A][FONT=&quot]Dim LastRow As Long[/FONT][/COLOR][COLOR=#1A1A1A][FONT=&quot]

With ActiveWorkbook.Sheets("Report")
LastRow = .Range("A" & .Rows.Count).End(xlUp).Row

End With

ActiveSheet.Range("V11").Formula = Range("x11") / Application.SumIf(Range("i11:i" & LastRow), (Range("i11")), Range("x11:x" & LastRow))


[/FONT][/COLOR]

[COLOR=#1A1A1A][FONT=&quot]Range("V11").Copy[/FONT][/COLOR]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
If you want to put the formula in column V:

Code:
Sub test1()
 With Range("V11:V" & Range("A" & Rows.Count).End(xlUp).Row)
    .FormulaR1C1 = "=RC[2]/SUMIF(RC[-13]:R[2]C[-13],RC[-13],RC[2]:R[2]C[2])"
 End With
End Sub

Or this

Code:
Sub test1()
 With Range("V11:V" & Range("A" & Rows.Count).End(xlUp).Row)
    .FormulaR1C1 = "=RC[2]/SUMIF(R11C9:R13C9,R11C9,R11C24:R13C24)"
 End With
End Sub

To complete the formula I need you to explain what you want to put
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top