Short syntax lesson
Cells(Row, Column) identifies the cell. The string must be an integer from 1 to the maximum for the version of Excel that you are using. The column must be an identifier (for example: "A", "IV", "XFD") or a number (for example: 1, 256, 16384)
.Cells(Row, Column) identifies the cell inside the sheet identified in the earlier With statement:
With ActiveSheet : .Cells(Row,Column) : End With
If you omit the dot, Cells(Row,Column) is inside the active sheet. Therefore wsh = ActiveWorkbook wsh.Range not strictly necessary. However, I always use the With operator, so I don't wonder what sheet I had in mind when I get back to my code after six months. So, I would write:
With ActiveSheet : .Range. : End With
Actually, I would not have written above if I really did not want the code to work on the active sheet. What to do if the user has the wrong sheet active when running the macro. I would write:
With Sheets("xxxx") : .Range. : End With
because my code only works on xxxx sheet.
Cells(Row,Column) identifies the cell. Cells (rows, columns) .xxxx identify a cell property. Value is a property. Value is the default property, so you can usually omit it and the compiler will know what you mean. But in some situations, the compiler may be confused, so it is recommended that you enable .Value .
Cells(Row,Column) like "*Miami*" will give True if the cell is "Miami", "South Miami", "Miami, North" or something like that.
Cells(Row,Column).Value = "Miami" will give True if the cell is exactly equal to "Miami". For example, "MIAMI" will give False. If you want to accept MIAMI, use lower case:
Lcase(Cells(Row,Column).Value) = "miami"
My suggestions
Your code sample keeps changing as you try to use different sentences that I find confusing. You used Cells(Row,Column) <> "Miami" when I started typing this.
Using
If Cells(i, "A").Value like "*Miami*" And Cells(i, "D").Value like "*Florida*" Then Cells(i, "C").Value = "BA"
if you want to take, for example, "South Miami" and "Miami North."
Using
If Cells(i, "A").Value = "Miami" And Cells(i, "D").Value like "Florida" Then Cells(i, "C").Value = "BA"
if you want to take exactly Miami and Florida.
Using
If Lcase(Cells(i, "A").Value) = "miami" And _ Lcase(Cells(i, "D").Value) = "florida" Then Cells(i, "C").Value = "BA"
if you care.