Hi,
I am trying to write a macro that uses variables as the input to a formula within the macro.
I would rather not assign the variables A or B to a cell and just assign C to a chosen cell. So for example I am trying to achieve the following:
Sub macro1()
Dim A As Integer
Dim B As Integer
Dim C As Integer
A = 4
B = 5
C = Evaluate("sum(A,B)")
Cells(1,1) = C
End Sub
This gives me a run-time error 13.
I feel like I'm just missing something simple so thanks in advance.
Bookmarks