I'm trying to convert this formula "=RIGHT(G7,LEN(G7)-LEN(OFFSET(H7,0,-7)))" into VBA and wherever it references cell H7 I want it to use ActiveCell instead as this formula is used in a loop and is entered in a different row each time. Hope I explained my predicament articulately.
My attempt at converting the formula ended with:
ActiveCell.Formula = "=right(offset(" & ActiveCell & ",0,-1),len(offset(" & ActiveCell & ",0,-1)-len(offset(" & ActiveCell & ",0,-7))"
which gives me Run-time error '1004': Application-defined or object defined error.