I'm having some trouble with entering this formula through VBA. It works fine in Excel, and the syntax shown below was taken from the macro recorder, so I'm not understanding why I'm getting an error.
ws3.Range("AB" & LastRow3 + 1).Value "=IF(ISNUMBER(R[-1]C[-1]),RC[-1]-R[-1]C[-1],0)".
Here is an example of the data, with expected results.
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Weight[/TD]
[TD]Weight Change[/TD]
[/TR]
[TR]
[TD="align: right"]170.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD="align: right"]153.50[/TD]
[TD="align: right"]-16.50[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
ws3.Range("AB" & LastRow3 + 1).Value "=IF(ISNUMBER(R[-1]C[-1]),RC[-1]-R[-1]C[-1],0)".
Here is an example of the data, with expected results.
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Weight[/TD]
[TD]Weight Change[/TD]
[/TR]
[TR]
[TD="align: right"]170.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD="align: right"]153.50[/TD]
[TD="align: right"]-16.50[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]