Sub SG()
Dim Exp As Excel.Range, Comm As Excel.Range, Premium As Excel.Range
Dim i As Integer
Set Exp = ThisWorkbook.Sheets("MGN").Range("ER")
Set Comm = ThisWorkbook.Sheets("MGN").Range("ER")
Set Premium = ThisWorkbook.Sheets("MGN").Range("ER")
Application.ScreenUpdating = False
ThisWorkbook.Sheets("Input").Range("MacroInput").Value = ""
ThisWorkbook.Sheets("MGN").Range("ER").ClearContents
For i = 1 To Exp.Rows.Count
Application.StatusBar = "Calculating the experience rate for group number " & i & " of " & Exp.Rows.Count
ThisWorkbook.Sheets("Input").Range("MacroInput").Value = ExpRate.Cells(i, 1).Value
ThisWorkbook.Sheets("MGN Detail").Range("ERPasteTarget").Offset(i - 1).Value = ThisWorkbook.Sheets("MGN Detail").Range("ERCopyRange").Value
Next i
Bookmarks