My code works only for the selected cell. I want it to work for every cell in Column A.
Here is my code so far:
Sub Splitter()
Dim i As Integer
Dim Text As String
Dim Item As Variant
Text = ActiveCell.Select
Item = Split(ActiveCell, "-")
For i = 0 To UBound(Item)
Cells(3, i + 2).Value = Item(i)
Next i
If Range("B3").Value = "CHOP" Then
Range("D3").Value = "chopsticks"
ElseIf Range("B3").Value = "NAPK" Then
Range("D3").Value = "napkins"
ElseIf Range("B3").Value = "RICE" Then
Range("D3").Value = "white rice"
ElseIf Range("B3").Value = "SOYS" Then
Range("D3").Value = "soy sauce"
ElseIf IsEmpty(Range("D3").Value) = True Then
Range("D3").Value = "other"
End If
End Sub
I am also trying to get it to continue to work if rows are added.