Hello,
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
I receive a weekly spreadsheet containing worldwide sales data. For each country in which a product of ours is sold, that country is represented by their two letter country code in the spreadsheet (ex. US, CA, GB, etc.). The team, to which I pass along the data, is just concerned with the total sales numbers for the particular world regions (ex. North America, Europe, etc.) so I need to find some way in which to convert the country code to the applicable region name and then place that region name in a separate column. I assume this would consist of creating a script with two arrays; one array containing the country codes and the other containing the region names?
<o></o>
<o></o>
In summary, this is what I’d be looking to do:
<o></o>
<o></o>
1. Select the column containing the country codes. In this case, the country codes are found in column E.
<o></o>
2. Call on some sort of function to convert the country code to the region name and place the region name in column F – on the same row, obviously.
<o></o>
3. For any countries which appear in the spreadsheet, but not in the array, the region name will be presented as a blank cell.
<o></o>
<o></o>
Hope this makes sense.
<o></o>
<o></o>
Unfortunately, I’m not a programmer by any means so specific instructions/code will certainly be appreciated. To make things easy, an example can be used with just “US” converting to “North America” and “GB” converting to “Europe”. “US” and “GB” would be found in cells E2 and E3 respectively and their corresponding region names would be placed in F2 and F3.
<o></o>
<o></o>
I’m sure something like this exists many times over but I haven’t been able to come across it in my searches. Seems that all I came across were those which converted something you typed rather than selected from already existing data.
<o></o>
<o></o>
Thanks in advance to whomever can help with this.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
I receive a weekly spreadsheet containing worldwide sales data. For each country in which a product of ours is sold, that country is represented by their two letter country code in the spreadsheet (ex. US, CA, GB, etc.). The team, to which I pass along the data, is just concerned with the total sales numbers for the particular world regions (ex. North America, Europe, etc.) so I need to find some way in which to convert the country code to the applicable region name and then place that region name in a separate column. I assume this would consist of creating a script with two arrays; one array containing the country codes and the other containing the region names?
<o></o>
<o></o>
In summary, this is what I’d be looking to do:
<o></o>
<o></o>
1. Select the column containing the country codes. In this case, the country codes are found in column E.
<o></o>
2. Call on some sort of function to convert the country code to the region name and place the region name in column F – on the same row, obviously.
<o></o>
3. For any countries which appear in the spreadsheet, but not in the array, the region name will be presented as a blank cell.
<o></o>
<o></o>
Hope this makes sense.
<o></o>
<o></o>
Unfortunately, I’m not a programmer by any means so specific instructions/code will certainly be appreciated. To make things easy, an example can be used with just “US” converting to “North America” and “GB” converting to “Europe”. “US” and “GB” would be found in cells E2 and E3 respectively and their corresponding region names would be placed in F2 and F3.
<o></o>
<o></o>
I’m sure something like this exists many times over but I haven’t been able to come across it in my searches. Seems that all I came across were those which converted something you typed rather than selected from already existing data.
<o></o>
<o></o>
Thanks in advance to whomever can help with this.