Следующая формула будет работать в Excel 2007 и 2010, предполагая, что ячейка страны - A1, ячейка значений - B1 и обе ячейки содержат 7 значений, разделенных 6 запятыми:
Страны:
=LEFT(A1,SEARCH(",",A1)-1)&","&LEFT(RIGHT(A1,LEN(A1)-SEARCH(",",A1,SEARCH(",",A1)+1)),SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1)+1)+1)-SEARCH(",",A1,SEARCH(",",A1)+1)-1)&","&LEFT(RIGHT(A1,LEN(A1)-SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1)+1)+1)),SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1)+1)+1)+1)-SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1)+1)+1)-1)&","&RIGHT(A1,LEN(A1)-SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1,SEARCH(",",A1)+1)+1)+1)+1)+1))
Ценности:
=LEFT(B1,SEARCH(",",B1)-1)+LEFT(RIGHT(B1,LEN(B1)-SEARCH(",",B1)),SEARCH(",",B1,SEARCH(",",B1)+1)-SEARCH(",",B1)-1)&","&LEFT(RIGHT(B1,LEN(B1)-SEARCH(",",B1,SEARCH(",",B1)+1)),SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)-SEARCH(",",B1,SEARCH(",",B1)+1)-1)&","&LEFT(RIGHT(B1,LEN(B1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)),SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)-1)+LEFT(RIGHT(B1,LEN(B1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)),SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)+1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)-1)+LEFT(RIGHT(B1,LEN(B1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)+1)),SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)+1)+1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)+1)-1)&"," &RIGHT(B1,LEN(B1)-SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1,SEARCH(",",B1)+1)+1)+1)+1)+1))
Это также может быть сделано с VBA. Дайте мне знать, если вы используете старую версию Excel, и я могу опубликовать это.