Hello i am trying to do a formula change in VBA within that is within a for statement and an offset, but not sure if i am doing this right here is my code below
what i am trying to do is use a for loop with 1 to 3 for now, then the first formula im trying to change is on F44 then want it to offset over 0 rows but 4 columns so then the next cell the formula should be placed in on J44 then over another 4 columns on N44 and so on
I am not getting it right and wanted to check the logic to edit, thank you!
what i am trying to do is use a for loop with 1 to 3 for now, then the first formula im trying to change is on F44 then want it to offset over 0 rows but 4 columns so then the next cell the formula should be placed in on J44 then over another 4 columns on N44 and so on
I am not getting it right and wanted to check the logic to edit, thank you!
VBA Code:
Sub test()
Dim page As Workbook
Set page = Application.ThisWorkbook
Dim page_ws As Worksheet
Set page_ws = page.Worksheets("Page 1")
Dim page_list As Worksheet
Set page_list = page.Worksheets("Pace Check")
For i = 1 To 3
page_ws.Range("F44").Offset(, i+3).Formula = "=IF(IFERROR(VLOOKUP(E7,'Pace Check'!$G$4:$R$200,12,FALSE),0) = ""Please fill out""," - -", IFERROR(VLOOKUP(E7,'Pace Check'!$G$4:$R$200,12,FALSE),0))"
Next i
End Sub