A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
This does it the way you want which isn't the way I'd do it. I'd find the last row and fill down but of course it's up to you.
Sub somesub()
Dim x As Long
'Starting on row 2 so change to suit
x = 2
Do While Cells(x, 1) <> ""
Cells(x, 2).FormulaR1C1 = _
"=IF(RC[-1]=1,""A"",IF(RC[-1]=2,""B"",IF(OR(RC[-1]=3,RC[-1]=4),""C"",IF(RC[-1]=5,""D"",IF(OR(RC[-1]=6,RC[-1]=7),""E"")))))"
x = x + 1
Loop
End Sub