Hi,
I'm struggling with a problem that I cannot solve myself.
Every day I receive excel file with different amount of data:
Example:
Country+Place |
Number |
Country |
DE-Place1 |
535632 |
DE |
DE-Place2 |
2356 |
DE |
DE-Place3 |
65867 |
DE |
PL-Place1 |
7165 |
PL |
PL-Place2 |
5768712 |
PL |
PL-Place3 |
4354 |
PL |
PL-Place4 |
87777 |
PL |
US-Place1 |
725465 |
US |
FR-Place1 |
353 |
FR |
FR-Place2 |
344 |
FR |
FR-Place3 |
345 |
FR |
FR-Place4 |
346 |
FR |
FR-Place5 |
347 |
FR |
LU-Place1 |
987 |
LU |
LU-Place2 |
988 |
LU |
What I need to do is to select first half of cells with every country and to column D I need to add TEXT - 1, to second half - TEXT - 2, so it will looks like this.
Country+Place |
Number |
Country |
TEXT |
DE-Place1 |
535632 |
DE |
TEXT - 1 |
DE-Place2 |
2356 |
DE |
TEXT - 1 |
DE-Place3 |
65867 |
DE |
TEXT - 2 |
PL-Place1 |
7165 |
PL |
TEXT - 1 |
PL-Place2 |
5768712 |
PL |
TEXT - 1 |
PL-Place3 |
4354 |
PL |
TEXT - 2 |
PL-Place4 |
87777 |
PL |
TEXT - 2 |
US-Place1 |
725465 |
US |
TEXT - 1 |
FR-Place1 |
353 |
FR |
TEXT - 1 |
FR-Place2 |
344 |
FR |
TEXT - 1 |
FR-Place3 |
345 |
FR |
TEXT - 1 |
FR-Place4 |
346 |
FR |
TEXT - 2 |
FR-Place5 |
347 |
FR |
TEXT - 2 |
LU-Place1 |
987 |
LU |
TEXT - 1 |
LU-Place2 |
988 |
LU |
TEXT - 2 |
I can do it manually but it takes too much time as in one file I can get even 300 rows of data.
I'm not very familiar with VBA, I tried to make so macro but it won't work as I wanted.
This code selct half of cells but when I filter data to see only DE country, it still select half of cells from ALL data (even hidden by filter).
There is another problem with data I receive, because every day I can get different countries.
Can I ask for help with this one?
Thank you
Bookmarks