Hello Experts!
I am attempting to write a macro that will locate the first row in column “D” that is blank and then write in this formula: "=SUMIFS([WebStats_Data_Pull.xlsm]Append_Data!C14,[WebStats_Data_Pull.xlsm]Append_Data!C3,C[-1],[WebStats_Data_Pull.xlsm]Append_Data!C1,C[-3],[WebStats_Data_Pull.xlsm]Append_Data!C2,C[-2])".
I then need to copy it down to autofill to all cells below. I will need to do this for columns D, E and F. I am also getting stuck in the way that my formula currently references specific cells but the destination cell will always be different as it should be updating in the first blank row.
This is the code that I have so far…
Sub Formula()
‘Finds the first blank row in column D
Dim WS as WorkSheet
Dim I As Long, MaxRow1 As Long
Set WS = Worksheet (“Data_Combine.xlsm”)
MaxRow1 = WS.Range(“D” & WS.Rows.count).End(xlUp).Row + 1
Activecell.Formula = "=SUMIFS([WebStats_Data_Pull.xlsm]Append_Data!C14,[WebStats_Data_Pull.xlsm]Append_Data!C3,C[-1],[WebStats_Data_Pull.xlsm]Append_Data!C1,C[-3],[WebStats_Data_Pull.xlsm]Append_Data!C2,C[-2])"
I really appreciate any help you are able to provide me! Thank you!
Jbeets
Bookmarks