Hi
In that case
Sub FillData()
Dim rng1 As Range
anchor_cell = "B1" 'INSERT the Cell value of the first "Type_value"
curr_row = Range(anchor_cell).Row
curr_col = Range(anchor_cell).Column
last_row = Range(anchor_cell).End(xlDown).Row
last_col = Range(anchor_cell).Offset(0, 10).Column
i = 1
Set rng1 = Range(Cells(curr_row, curr_col + 1), Cells(curr_row, last_col))
Do While i < 100 And i <= last_row - 1
If i < 10 Then
rng1.Offset(i, 0).FormulaR1C1 = "=type0" + CStr(i) + "/Divider"
i = i + 1
Else: If i >= 10 Then _
rng1.Offset(i, 0).FormulaR1C1 = "=type" + CStr(i) + "/Divider"
i = i + 1
End If
Loop
End Sub
Bookmarks