I’m trying to populate a cell with a basic formula that references both the current worksheet and another worksheet.
The formula I am trying to input into a cell is basically… ='Sheet2'A(j) / B(i) with the following code:
For i = 1 To 5
For j = 1 To 5
With shOut.Cells(i,j)
.formula = "='Sheet2'" & Cells(j,1)).Address & "/" & Cells(i,2).Address
End With
Next j
Next i
The part I am having trouble with is the sheet referencing at the start; when I run this in a .formula, it triggers an error.
However, when I remove the ‘=’ sign and make it output in a .Value, it prints out what I want it to, except it’s not a formula.
)too much in your line that begins with.formula.You are missing the
!after the sheet: