Macro to copy email attachments and paste data in exsisting wkbk in different tabs

Faintkitara

Board Regular
Joined
Jun 23, 2016
Messages
59
So I have a folder labeled "Weekly" with 6 different emails with "Scheduled Report" somewhere in the subject line. I need to create a macro that will copy each of those different sheets and paste them as different tabs in a specific excel workbook labeled "Revenue".

I then wanted to label each copied tab based on the Labels in the first cell. So if one copied sheet had "Monthly report w/0 Contingencies", I would want the Macro to catch "Contingencies" and automatically name the tab something that I wanted like "Plan"

But I would want it to do this exact thing for specifically the six other copied sheets and not the other tabs that may be listed in the document already.


Sorry its a lot, but is there a way to do this in VBA? What would the code look like?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,213,537
Messages
6,114,216
Members
448,554
Latest member
Gleisner2

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