Hi Everyone.
I need someone who can help me in creating a macro for my output in excel. I have the below data set where, I want to write the data based on the intercompany in different excel tab of my output file.
| CCY | LE | N Account | S Account | C Center | Inter Company | Product | Trans Type | Ending Balance |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 1 | 0 | 0 | -14.1 |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 1 | 0 | 0 | -30 |
| JPY | xxxx | xxxxxxxxxxx | 0 | 0 | 2500 | 0 | 0 | 40 |
| JPY | xxxx | xxxxxxxxxxx | 0 | 0 | 2500 | 0 | 0 | 24 |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 2500 | 0 | 0 | -3116.25 |
| JPY | xxxx | xxxxxxxxxxx | 0 | 0 | 2509 | 0 | 0 | 110050 |
| AUD | xxxx | xxxxxxxxxxx | 0 | 0 | 3080 | 0 | 0 | -1195 |
| JPY | xxxx | xxxxxxxxxxx | 0 | 0 | 3500 | 0 | 0 | 1346 |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 3500 | 0 | 0 | -2616 |
| JPY | xxxx | xxxxxxxxxxx | 0 | 805CN9 | 3915 | 0 | 0 | 125 |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 7501 | 0 | 0 | 1160 |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 7501 | 0 | 0 | 41.2 |
| USD | xxxx | xxxxxxxxxxx | 0 | 90052D | 7606 | 0 | 0 | -998.81 |
| USD | xxxx | xxxxxxxxxxx | 0 | 0 | 7802 | 0 | 0 | 418.2 |
| USD | xxxx | xxxxxxxxxxx | 0 | 90052D | 7890 | 0 | 0 | -355.38 |
My output file is fixed with all the intercompany tab names in it. Below are my requirements:-
1) I want this to achieve by macro only
2) All the possible Intercompany names tab will be there in the output file. There are some formula also in each intercompany tabs, so we need to write the data in specified area only i.e. A1 to K20.
3) There are high possibility that we will not get all the Intercompany every time. Hence, I want alteryx to clear the previous data for those intercompany where we do not have the data in current period.