Hi,

I have a column of numerical data in column H. I want to run a loop to test the value of the data in each row of the column.

For each cell, depending on the value, want output in column I of either "L", "M" or "H" (without the quotations). This is what I have rigged up so far, but I am doing something wrong with the offset function. Also if anyone has a suggestion for an easier way that would be cool too. Thanks


    Sheets("Annual Summary").Activate
    
    Dim APIrng As Range
    Set APIrng = Workbooks("Co-op Compiler.xlsm").Worksheets("Annual Summary").Range("G2:G" & lrow)
    
        For Each Cell In APIrng
            If Cell.Value > 31.1 Then
                Offset.Cell(0, 2) = "L"
            ElseIf Cell.Value < 31.1 And Cell.Value > 22.3 Then
                Offset.Cell(0, 2) = "M"
            ElseIf Cell.Value < 22.3 And Cell.Value > 0 Then
                Offset.Cell(0, 2) = "H"
            End If
        Next