I have some VBA built that handles code on worksheet Selection Change that works fine. But I have some formulas that it is automatically inserting referencing other cells.
However, when I have to delete a row (due to duplicate information), the cell formulas do not automatically update. I need the formula to either hold the cell reference dynamically, or and event Delete row procedure where I can refresh the formulas.
A formula I'm using is
ActiveCell.Offset(0, 2).Formula = "=IF(ISBLANK(B" & refrow & ")," & _ ActiveCell.Offset(-1, 2).Value & " +1,1)"
So its basically just adding a one to the cell value above it, but when I delete a row, it holds the same value because the cell reference is gone, and leaves the previous row's value in the formula, and no the cell reference....either way to handle this would work...
However, when I have to delete a row (due to duplicate information), the cell formulas do not automatically update. I need the formula to either hold the cell reference dynamically, or and event Delete row procedure where I can refresh the formulas.
A formula I'm using is
ActiveCell.Offset(0, 2).Formula = "=IF(ISBLANK(B" & refrow & ")," & _ ActiveCell.Offset(-1, 2).Value & " +1,1)"
So its basically just adding a one to the cell value above it, but when I delete a row, it holds the same value because the cell reference is gone, and leaves the previous row's value in the formula, and no the cell reference....either way to handle this would work...