VBA to loop among filter criteria

prsnthkrishna

New Member
Joined
Jul 31, 2020
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I'm working with excel vba macro, I was able to write some codes time to time by adapting already existing ones from the net or via macro recording.

This time I was not able to find a solution wandering through the net, I'll try to explain what I would like to achieve.

I have an excel sheet, clearly bigger, but more or less like the following (it is not a table neither a pivot table, it is just a worsheet filled with data):

CountryTransaction ID (Approval Req # - NIPR #)TierBUMain BUMCCRebate AmtPartner TATAmt in USD*Partner TAT
KRKR76REA200515_0012T1PSGPPS27R1,654.28
45​
74,443
KRKR76REA200519_0008T2PSGPPS27R17,124.39
33​
565,105
AUKR76REA200522_0001T1IPGPPS77R4,955.48
35​
173,442
AUKR76REA200522_0036T2IPGPPS77R1,453.96
23​
33,441
AUKR76REA200528_0002T1IPGPPS77R25,080.78
19​
476,535
KRKR76REA200528_0003T2IPGPPS77R14,959.61
19​
284,233
HKKR76REA200528_0007T2IPGPPS77R35,181.74
19​
668,453
HKKR76REA200528_0010T1PSGPPS77R9,964.86
33​
328,840
KRKR76REA200528_0011T2PSGPPS77R18,330.37
33​
604,902

On the column headers I have an auto-filter, I would like to automatically filter each country, Tier and Partner TAT and take sum of Rebate Amt. It means I want to filter AU, T1 and 35 (Partner TAT) and sumup Rebate Amt, then filter KR, T1, 45 and sumup the rebate amt.. and so forth, everything automatically just by pressing a button.

I was not able to figure out how to automatically filter for all the available criteria in three columns.

The total number of countries is around 100 (by the way they can partially change every month), everyday I will have around 130 countries but they can be different from the previous day.

Total rebate amount should be entered in below Table (this is T1 table)

Hope I explained myself decently.


T1Target TATRebate Paid in TAT
AU15
NZ15
ID35
KR35
SEMC35
MY35

Thank you so much :)

Prashanth Krishna
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Cross posted multiple sites.

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Please supply links to all other sites where you have asked this question.
 
Upvote 0
Cross posted multiple sites.

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Please supply links to all other sites where you have asked this question.

If I get the exact answer, I will immediately update in other sites.

I still didn't get answer for this. Can you help here..
 
Upvote 0
Please supply links to all other sites where you have asked this question.
Thanks
 
Upvote 0
Upvote 0
I asked for ALL links, not just one of them.
 
Upvote 0
No it is not done. You have asked this question on more than one other site.
You must supply links to ALL other sites.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top