I wish to average cells M through AV into cell AW. If there is a value containing a < symbol, ie: "<0.005" then I need it converted to ".0025" before the calculation. Here is my code so far:
Code:
Sub ColumnAWFormula()
Dim rCell As Range
For i = 5153 To 5153
Range("M" & CInt(i) & ":AV" & CInt(i)).Name = "MyRange"
For Each rCell In Range("MyRange")
If InStr(1, rCell.Value, "<0.005", vbTextCompare) = 1 Then
Debug.Print "Row " & CInt(i) & " contains <0.005"
Else
Range("AW" & CInt(i)).Formula = "=AVERAGE(M" & CInt(i) & ":AV" & CInt(i) & ")"
End If
Next rCell
Next i
End Sub