Johnny Thunder
Well-known Member
- Joined
- Apr 9, 2010
- Messages
- 693
- Office Version
- 2016
- Platform
- MacOS
Hi group,
I am working on a piece of code that seemed to work in the past and now I am getting a weird error? "Error 450: Wrong number of arguments or invalid property assignment".
I have marked the line with the error below.
I have tried several variations of the line to see if I could troubleshoot but no luck.
With Sheets("DPL YR2")
.Visible = True
.Unprotect
.Select
.Range("BS58").ClearContents
.Range("A58:BN58").ClearContents
.Range("BS134").ClearContents
.Range("A134:BN134").ClearContents
.Range("P2").FormulaR1C1 = _
"=IF(OR(R1C<=PDACTUALS),0,IF(ABS(SUM(R15C:R165C)-ROUND(SUMIF('CF-LOC'!R11,R1C,'CF-LOC'!R115)*LOADSCALE,2)+ROUND(SUMIF('CF-LOC'!R11,R1C,'CF-LOC'!R128)*LOADSCALE,2))<loadchk1,0,(sum(r15c:r165c)-round(sumif('cf-loc'!r11,r1c,'cf-loc'!r115)*loadscale,2)+round(sumif('cf-loc'!r11,r1c,'cf-loc'!r128)*loadscale,2))))"
.Range("P2").Copy
.Range("T2", "X2", "AB2", "AF2", "AJ2", "AN2", "AR2", "AV2", "AZ2", "BD2", "BH2").Paste <------------------- Getting the error here-----------------------
Application.CutCopyMode = False
.Calculate
End With
Other Variations -
Variation1
Variation2
</loadchk1,0,(sum(r15c:r165c)-round(sumif('cf-loc'!r11,r1c,'cf-loc'!r115)*loadscale,2)+round(sumif('cf-loc'!r11,r1c,'cf-loc'!r128)*loadscale,2))))"
I am working on a piece of code that seemed to work in the past and now I am getting a weird error? "Error 450: Wrong number of arguments or invalid property assignment".
I have marked the line with the error below.
I have tried several variations of the line to see if I could troubleshoot but no luck.
With Sheets("DPL YR2")
.Visible = True
.Unprotect
.Select
.Range("BS58").ClearContents
.Range("A58:BN58").ClearContents
.Range("BS134").ClearContents
.Range("A134:BN134").ClearContents
.Range("P2").FormulaR1C1 = _
"=IF(OR(R1C<=PDACTUALS),0,IF(ABS(SUM(R15C:R165C)-ROUND(SUMIF('CF-LOC'!R11,R1C,'CF-LOC'!R115)*LOADSCALE,2)+ROUND(SUMIF('CF-LOC'!R11,R1C,'CF-LOC'!R128)*LOADSCALE,2))<loadchk1,0,(sum(r15c:r165c)-round(sumif('cf-loc'!r11,r1c,'cf-loc'!r115)*loadscale,2)+round(sumif('cf-loc'!r11,r1c,'cf-loc'!r128)*loadscale,2))))"
.Range("P2").Copy
.Range("T2", "X2", "AB2", "AF2", "AJ2", "AN2", "AR2", "AV2", "AZ2", "BD2", "BH2").Paste <------------------- Getting the error here-----------------------
Application.CutCopyMode = False
.Calculate
End With
Other Variations -
Variation1
Code:
.Range("P2").Copy .Range("T2", "X2", "AB2", "AF2", "AJ2", "AN2", "AR2", "AV2", "AZ2", "BD2", "BH2") '-----Errors out as well
Variation2
Code:
.Range("T2", "X2", "AB2", "AF2", "AJ2", "AN2", "AR2", "AV2", "AZ2", "BD2", "BH2").value = .Range("P2").Value '-----Errors out as well
Last edited: