Complicated Project

VBAnewbie7

New Member
Joined
Aug 24, 2019
Messages
7
I'm new to VBA and so far i've mostly copied other macros and adjusted them to my needs. So i don't fully understand the language.

I deal with A LOT of data at work, usually a table with thousands of rows of data, and about a dozen columns. I always have to filter the data on a specific item code, then copy and paste that into a new worksheet as sort of a "snapshot" of the data that corresponds to that item code.

Is there a way with VBA to create a tool to where i could put the entire table of data onto a "control" sheet and then have a macro individually run a filter on each item code, create a "snapshot" (copy and paste the filtered table as values) to a newly created sheet, maybe even with that item code as the new sheet name?

Examples of item codes are AA, BB, CC, DD, and roughly 20 others.
Examples of data that corresponds to these item codes are labor hours, charge numbers, activity IDs, etc.

I know this is really complicated, but it would save me literally hundreds of hours. Any help at all is greatly appreciated! And if something like this has already been answered please point me in the direction and i will happily figure it out. Everything i've found so far though i have not been skilled enough to change it to meet this specific need.
 
Alright, i created a whole new module and typed it out myself and it works now, mostly.

It does the job but then at the very end it creates an "extra" sheet and then hits an error on this line:

Sheets.Add(after:=Sheets(Sheets.Count)).Name = Ar(x)

It is the more typical error of "Run-time error 1004. Application-defined or object-defined error"
This honestly isnt a huge deal as i can just delete the extra sheet but it would be great if it's an easy fix

Fixed this by placing "On Error Resume Next" before the line the error was happening on.

Thank you everyone for your help!! This is going to save me so much time and headache!
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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