Hi Team,
How to use select case for below situation. my code gives correct output,
want to replace the code with select case.
Column A is a input Column, Column B needs to fill. expected output is in Column E.
Thanks
mg
How to use select case for below situation. my code gives correct output,
want to replace the code with select case.
VBA Code:
Sub test()
Dim i As Long
For i = 2 To 10
If Cells(i, 1).Value >= 0 Then
Cells(i, 2).Value = "Overdue"
ElseIf Cells(i, 1).Value < 0 Then
Cells(i, 2).Value = "current"
Else
End If
Next i
End Sub
Column A is a input Column, Column B needs to fill. expected output is in Column E.
Book27 | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Ageing | Status | Ageing | Expected status | |||
2 | -10 | -10 | current | ||||
3 | 0 | 0 | Overdue | ||||
4 | 50 | 50 | Overdue | ||||
5 | -7 | -7 | current | ||||
Sheet1 |
Thanks
mg