Dear all big brothers and sisters,
May I ask is there any macro that can change the formula from relative reference to absoulte reference?
I have the one as the following, however, it can't be applied on the formula with sumproduct and sumif.
I have the formula like as =SUMPRODUCT(--(Table!$C$2:$C$20=A18),--(Table!$F$2:$F$20="others"),Table!$L$2:$L$20)+SUMPRODUCT(--(Table!$C$2:$C$20=A18),--(Table!$F$2:$F$20="others"),Table!$N$2:$N$20)
However, after I use the macro (select the range from B18 to C20), it changed to #value.
Sub Absolute()
Dim cell As Range
With Application: .ScreenUpdating = 0: .Calculation = xlManual
For Each cell In Selection
If cell.HasFormula Then cell = Application.ConvertFormula(cell.Formula, xlA1, , xlAbsolute)
Next: .ScreenUpdating = 1: .Calculation = xlCalculationAutomatic: End With: End Sub
Appreciate your reply.
Bookmarks