Auto-Filter or Loop?

jrincar

New Member
Joined
Oct 26, 2016
Messages
10
I have been working on this macro for a little and got stuck, wondering if anybody has any suggestions. Ill post the code and the output below for reference.

Excel Output & Code - Album on Imgur

Everything under the last row with a category name in all caps ("CONTINGENCY" in this case) needs to be removed. This macro will be used on other sheets as well, where the last category name could be something different next time. However, the cut off will always be the last category name formatted with all caps.

The goal of this macro is to create a one click solution to extracting specific data from a much larger spreadsheet into the table pictured, which is formatted this way because it matches our report style. The category names that aren't all caps are sub-categories and aren't needed in the report.

I do not want to do a pivot table. Looking for one or two lines of code I can add to what I already have in order to achieve this, if possible.

I am also open to suggestions on how to simplify what I have written so far.

Thanks!
 

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).

Forum statistics

Threads
1,215,730
Messages
6,126,529
Members
449,316
Latest member
sravya

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