This code works perfectly in the the first row only. I tried to add loop but keep getting errors. I need this move down a row and continue moving down. This is my first time doing this and I have been researching for hours. I have been using a function but i have to many conditions to list.
Sub test()
Dim Vendor As String, account As String
Vendor = Range("A2")
If Vendor = "ABC" Then
account = "Statement A"
ElseIf Vendor = "DEF" Then
account = "Statement B"
ElseIf Vendor = "GHI" Then
account = "Statement C"
Else
account = "statement c"
End If
Range("F2") = account
End Sub
Sub test()
Dim Vendor As String, account As String
Vendor = Range("A2")
If Vendor = "ABC" Then
account = "Statement A"
ElseIf Vendor = "DEF" Then
account = "Statement B"
ElseIf Vendor = "GHI" Then
account = "Statement C"
Else
account = "statement c"
End If
Range("F2") = account
End Sub