Hello,

I'm very new to VBA and need some help.

I'm trying to create a custom function that will read a value in one cell and then write a different value in an adjacent cell.

More specifically, I have a list of 50 countries in one column, and I want to write a corresponding global region in the cell next to it. So if the if cell A1 is "USA" then the function would write "North America" in cell B1. Cell A2 might be "China" and the function would write "Asia" in cell B2.

I think I need to use If and Elseif, but I don't know how to put it together. How can I do this? Thanks for the help.