Macro to add worksheets based on tab color

uapak90

New Member
Joined
Jul 8, 2011
Messages
3
Hi,

I am new to macros - have done beginner stuff but nothing to this extent. This is the type of workbook I have and I need to add values of those tabs to a different sheet (they all look the same, just with different numbers. Its kinda like a group and sub groups and the numbers from the sub groups need to be added to the larger group, then that number needs to be added to a larger group etc). Here is a little visualization:

RED TAB / BLACK / YELLOW / YELLOW / WHITE / WHITE / WHITE / YELLOW / BLACK / YELLOW / WHITE / WHITE / YELLOW / BLACK

So what I have to do is add all the contents of the white tab to the yellow tab adjacent to the left of them. Then add all the contents of the yellow tabs to the black tab adjacent to the left of it. Then add all the black tabs to the main red tab in the beginning.

I can't seem to even start on this code ... any help would be great

I was thinking maybe have some sort of input system where a user selects which worksheets should add to which worksheet - and repeats the process but it seemed kinda lengthy
 

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.
Obviously the tabs are related somehow. Wouldn't referring to the Sheet name vs color be easier? Or do the colors change regularly?
 
Upvote 0
The issue is, i would need to run this on several different workbooks and the sheet names as well as the quantity of worksheets would change for different workbooks
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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