I can't make this simple command work:
Cells(l, 7).Formula = "=" & var1 & " * " & var2 & " * " & var3 & " / 252"
I can paste the inspected formula string value in Excel and it works as expected.
Cells(l,7) is a proper reference, as I can inspect its value.
Inspected formula on debug: "=86710597,9409 * 0,02 * 0,35 / 252"
The problem is when a variable is represented as string it will have the system's decimal point. In your case it is a comma so you need to convert it to dot, for example using replace() function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With