Unable to fill formula in the range which has been set.

Closed
Report
-
 Blocked Profile -
Hello,

I have created vba to creatable from the consolidated data in a sheet1. After a table structure is created, the macro will populate the values based on the formula.

in my macro there are 3 tables. the 1st table is getting created with appropriate values based on the formula. during the process od 2nd and 3rd table, formula which is applied for grandtotal sums the above table. This is the area where the error is starting and proceeds the same for the remaining tables.

I don't have any issues when this macro is run in my system. when this gets run on the other system, this error occurs. Any fix for this. EXCEL 2013

Below is the sample::
SUB UPDATE()


Range("C16").Select
ActiveCell.FormulaR1C1 = _
"=COUNTIFS('Con_DATA'!C4,RC2,'Con_DATA'!C[10], ""laNE"")"
Selection.AutoFill Destination:=Range("C16:C22"), Type:=xlFillDefault
Range("C16:C22").Select


Range("D16").Select
ActiveCell.FormulaR1C1 = _
"=COUNTIFS('Con_DATA'!C4,RC2,'Con_DATA'!C[9], ""MED"")"
ActiveWorkbook.Save
Selection.AutoFill Destination:=Range("D16:D22"), Type:=xlFillDefault
Range("D16:D22").Select
Range("E16").Select
ActiveCell.FormulaR1C1 = _
"=COUNTIFS('Con_DATA'!C4,RC2,'Con_DATA'!C[8], ""SIM"")"
ActiveWorkbook.Save
Selection.AutoFill Destination:=Range("E16:E22"), Type:=xlFillDefault
Range("E16:E22").Select
Range("F16").Select
ActiveCell.FormulaR1C1 = _
"=COUNTIFS('Con_DATA'!C4,RC2,'Con_DATA'!C[7], ""TAPE`enter code here`"")"
ActiveWorkbook.Save
Selection.AutoFill Destination:=Range("F16:F22"), Type:=xlFillDefault
Range("F16:F22").Select
Range("G16").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-4]:RC[-1])"
ActiveWorkbook.Save
Selection.AutoFill Destination:=Range("G16:G22"), Type:=xlFillDefault
Range("G16:G22").Select
Range("C23").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)"
ActiveWorkbook.Save
Selection.AutoFill Destination:=Range("C23:G23"), Type:=xlFillDefault
Range("C23:G23").Select
ActiveWorkbook.Save
End Sub

1 reply


Well, REM out the workbook save, and try it on the remote station again.

If it doesn't error out, then I suspect that the location in which you are running it, might have some restrictions on saving for the user. Is the error persistent if you run it as admin?