Hi,
How do I prevent relative cell referencing with this formula?
Dim LastRow As Long
LastRow = Worksheets("data").Cells(Rows.Count, "I").End(xlUp).Row
Range(Range("N2"), Range("N2").End(xlDown)).formula = _
"=SUMIFS(data!J2:J" & LastRow & ",data!I2:I" & LastRow & ",Sheet1!I2)"
Range("N2").Select
Selection.AutoFill Destination:=Range(Range("N2"), Range("N2").End(xlDown))
Range(Range("N2"), Range("N2").End(xlDown)).Select
How do I prevent relative cell referencing with this formula?
Dim LastRow As Long
LastRow = Worksheets("data").Cells(Rows.Count, "I").End(xlUp).Row
Range(Range("N2"), Range("N2").End(xlDown)).formula = _
"=SUMIFS(data!J2:J" & LastRow & ",data!I2:I" & LastRow & ",Sheet1!I2)"
Range("N2").Select
Selection.AutoFill Destination:=Range(Range("N2"), Range("N2").End(xlDown))
Range(Range("N2"), Range("N2").End(xlDown)).Select