Hi AB33.
I tried this code below, it does the same as the formula. You can also see it in the new uploaded testsheet.
The problem is not the settings in the code for Sheet Middle Result1. They can be like this way.
The problem is the range for sheet Middle result.
Exsample for Denmark it set to
But this reference or range have to someway to refer to the Country Name (Denmark) in Column A and to last used cell in Column B.
If it can be done like this, it can be done and also the range of rows can expand or be smaller.
Then it will be great and the code who find the result in sheet Middle Result, will work exelent. Because it display how many catagories there is.
And as you can see from country to country ist different.
So to change the code
with reference to the Country Name in Column A and to last used cell in Column B, i think will work.
It can be done first for one country and then maybe see how it can be put together for all countries.
Below is the code i used to do macro for country Denmark and United Kingdom.
And there is also a new test sheet(forgot one catagory in the first)
So have a look.
Thanks in advance
Abjac
Bookmarks