I need my macro to calculate the date difference between 2 ranges in 2 different sheets.
Ive got the codes below using record macro, however my range is not fixed as i'm using unfixed cells like (Cells (b, c)).
I've tried
But this doesn't work.
Ive got the codes below using record macro, however my range is not fixed as i'm using unfixed cells like (Cells (b, c)).
Code:
ActiveCell.FormulaR1C1 = "=DATEDIF(R[5]C,'production breakdown'!R[-5]C[1],""d"")"
Code:
Cells(b, c) = DATEDIFF("d",(Cells(b,y)),'Production Breakdown'!B2) & Cells(b, c).FormulaR1C1 = "=DATEDIF(RC[-1],'Production Breakdown'!B2,""d"")"