I have two columns lets say A and B. In column A I've values like Apple, banana, Brinjal and in column B Ripe and Not Ripe. In column C I want to check if it is a fruit or vegetable and then riped or not riped. I want the below result.
How to use multiple Case statements?
Private Sub CommandButton1_Click()
Dim category As String, result As String
For i = 2 To 1000
category = Range("A" & i).Value
Select Case category
Case "Apple"
result = "Fruit"
Case "Brinjal"
result = "Vegetable"
End Select
Range("C" & i).Value = result
Next
End Sub
