VBA Code:
Dim ws As Worksheet, cell As Range
Set ws = ActiveSheet
Set nd = ws.Range("B10:B30")
For Each cell In nd
If cell.Value = ws.Range("L10") Or cell.Value = ws.Range("L11") Or cell.Value = ws.Range("L12") Or cell.Value = ws.Range("L13") Or cell.Value = ws.Range("L14") Or cell.Value = ws.Range("L15") Or cell.Value = ws.Range("L16") Or cell.Value = ws.Range("L17") _
Or cell.Value = ws.Range("L18") Or cell.Value = ws.Range("L19") Or cell.Value = ws.Range("L20") Or cell.Value = ws.Range("L21") Or cell.Value = ws.Range("L22") Or cell.Value = ws.Range("L23") _
Or cell.Value = ws.Range("L24") Or cell.Value = ws.Range("L25") Or cell.Value = ws.Range("L26") Or cell.Value = ws.Range("L27") Or cell.Value = ws.Range("L28") Or cell.Value = ws.Range("L29") _
Or cell.Value = ws.Range("L30") Or cell.Value = ws.Range("L31") Or cell.Value = ws.Range("L32") Or cell.Value = ws.Range("L33") Then
cells(cell.Row, 7).NumberFormat = "#,##0.00"
Else
cells(cell.Row, 7).NumberFormat = "General"
End If
VBA Code:
ws.range("L" & i) for i = 10 to 33