JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
I have many examples where I have to do this:
Because I am referencing back to a range to write these formulas, can these formulas be written to an array and then the array written back to the sheet?
Also, I have several situations where the With statement will only work if the Select statement is used first. I don't understand why because I thought the idea of the With statement is that we don't have to use a Select or Activate statement?
And one more . I have found several scenarios where the Select & With statements are present in the VBA Code, however, the code throws up a runtime error. If I click in the sheet and continue with the macro, it works fine.
Any ideas?
All guidance is very much appreciated.
I have many examples where I have to do this:
VBA Code:
Sub TimerCleartblCondBal()
Sheet52.Select
With Sheet52
irow = .Range("A" & Rows.Count).End(xlUp).Row
'Paste formulas for new data
.Range("FY2:FY" & irow).Formula2 = "=N2"
.Range("FZ2:FZ" & irow).Formula2 = "=BQ2"
.Range("GA2:GA" & irow).Formula2 = "=CF2"
End With
End Sub
Because I am referencing back to a range to write these formulas, can these formulas be written to an array and then the array written back to the sheet?
Also, I have several situations where the With statement will only work if the Select statement is used first. I don't understand why because I thought the idea of the With statement is that we don't have to use a Select or Activate statement?
And one more . I have found several scenarios where the Select & With statements are present in the VBA Code, however, the code throws up a runtime error. If I click in the sheet and continue with the macro, it works fine.
Any ideas?
All guidance is very much appreciated.