I am working with a 12 column database and trying to use the following bit of code to plug 4 formulas into 4 cells after the end of each row.
Unfortunately each FormulaR1C1 = statement is filling 12 cells instead of only 1.
Here is the code:
Range(“A3”).Select ‘ First Column Header is A3.
For Each rw In Selection.CurrentRegion.Rows
‘ Calc RunSize
rw.Offset(0, 21).FormulaR1C1 = “=( RC2 – RC1 ) + 1”
‘ Calc GapSize
rw.Offset(0, 22).FormulaR1C1 = “=( RC1 – R[-1]C2 ) – 1”
‘ Test RunSize
rw.Offset(0, 23).FormulaR1C1 = “=not( RC22 > 0 )”
‘ Test GapSize
rw.Offset(0, 24).FormulaR1C1 = “=not( RC23 = 0 )”
Next
What is wrong with my syntax?