Hello,
I have the below formula that I need to convert into a Looped VBA code, Can anyone please assist. Column A houses the account numbers for varying rows (data row count fluctuates). Any assistance would be greatly appreciated.
Also, instead of coding a range (B:B) into VBA, would it be possible to use a named range in VBA to loop though columns B (AccountName) and column C (Region)?
Thank you,
I have the below formula that I need to convert into a Looped VBA code, Can anyone please assist. Column A houses the account numbers for varying rows (data row count fluctuates). Any assistance would be greatly appreciated.
Also, instead of coding a range (B:B) into VBA, would it be possible to use a named range in VBA to loop though columns B (AccountName) and column C (Region)?
Excel Formula:
=IF(AND(SUMPRODUCT(--ISNUMBER(SEARCH({"LATAM "," LATAM "," LATAM"},B2)))>0,SUMPRODUCT(--ISNUMBER(SEARCH({"NAM","North America"},C2)))>0),"NA",IF(SUMPRODUCT(--ISNUMBER(SEARCH({" US "," NAM "," NAM","NAM,"},B2)))>0,"NA",IF(SUMPRODUCT(--ISNUMBER(SEARCH({"Mexico","MEX","México"},B2)))>0,"MEX",IF(SUMPRODUCT(--ISNUMBER(SEARCH({"LATAM "," LATAM "," LATAM"},B2)))>0,"LATAM",IF(SUMPRODUCT(--ISNUMBER(SEARCH({"NAM","North America"},C2)))>0,"NA",IF(ISNUMBER(SEARCH("Japan",C2)),"Japan",IF(SUMPRODUCT(--ISNUMBER(SEARCH({"APAC "," APAC "," APAC"},B2)))>0,"ASPAC",IF(ISNUMBER(SEARCH("Mexico",C2)),"MEX",IF(ISNUMBER(SEARCH("EMEA",C2)),"EMEA",IF(ISNUMBER(SEARCH("Asia Pacific",C2)),"ASPAC",IF(ISNUMBER(SEARCH("LATAM",C2)),"LATAM",IF(C2="",IF(SUMPRODUCT(--ISNUMBER(SEARCH({"US","Global"},B2)))>0,"NA",IF(C2="",IF(ISNUMBER(SEARCH("Mexico",B2)),"MEX","NEED TO MANUALLY ENTER")))))))))))))))
Thank you,