I have data in four columns in Excel. Column three ("C") contains a string which has a country name, e.g "The name of the country is China". The string is not standardized hence I am unable to use string functions like left/right/mid. I am creating a macro to filter six countries (Egypt, USA, China, Russia, Japan and Uganda). So far I can get two countries using the following macro:
Sub Countries ()
Activesheet.Range("A1:D1000").Autofilter Field:=3, Criteria1:=Array("*Japan*","*China*"),Operator:=xlFilterValues
End Sub
This is working and I am able to get the two countries filtered. However when I add more countries the Excel does not bring up the countries and returns no rows. I am not sure what I am not doing right and I am hoping someone can help me please