Hello,
I am sure you guys can help me with this:
my macro inserts a formula in cell D37 (FormulaCell variable) and I need to autofill this formula until the last not blank column, which in this case happens to be column M (Lastcolumn variable). I tried different solutions but no one worked, below is my last attempt, which does nothing at all...
Thank you in advance
I am sure you guys can help me with this:
my macro inserts a formula in cell D37 (FormulaCell variable) and I need to autofill this formula until the last not blank column, which in this case happens to be column M (Lastcolumn variable). I tried different solutions but no one worked, below is my last attempt, which does nothing at all...
VBA Code:
Lastcolumn = AuditCell.CurrentRegion.Columns.Count
VBA Code:
Set rngX1 = .Find("Accrual", LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
VBA Code:
Set FormulaCell = rngX1.End(xlDown).Offset(0, 3)
VBA Code:
FormulaCell.Formula = "=" & AuditCell.Offset(1, 0).Address(1, 0) & "/" & 4
VBA Code:
FormulaCell.AutoFill Destination:=FormulaCell.Resize(0, Lastcolumn), Type:=xlFillDefault
Thank you in advance