Copying conditional format (color) from multiple source sowksheets to destination sheet.

Davio

New Member
Joined
Jun 10, 2014
Messages
36
Hello,

I currently have 7 worksheets with identical data in ranges (A2:ACW9). The data in (B4:ACW9) from each sheet needs to be copied to a summary sheet. The macro below copies the data but fails to copy the conditional color formatting from the source sheets onto the destination sheet, ("Overview"). I'm looking to produce two solutions:

1. The first is to have the data and conditional color formatting from B4:ACW9 on "Team *" worksheets copied to the destination ("Overview") worksheet with the conditional color formatting referenced from the "Team *" source sheets.

2. Is it possible to consolidate the data and conditional color formatting in the following way?
-Source sheets: ("Team A").Range("B4:ACW9") and ("Team B").Range("B4:ACW9") data and conditional color formatting copied to Destination sheets: ("Summary" ). Range("B4:ACW9")
-Source sheets: ("Team C").Range("B4:ACW9"), ("Team D").Range("B4:ACW9"), ("Team E").Range("B4:ACW9") and ("Team F").Range("B4:ACW9") data and conditional color formatting copied to Destination sheets: ("Summary"). Range("B11:ACW16")
-Source sheets: ("Team G").Range("B4:ACW9") data and conditional color formatting copied to Destination sheets: ("Summary"). Range("B18:ACW23")

Any help in adjusting this macro is appreciated.

'In this example I am Copying the Data from Sheet1 (Source) to Sheet2 (Destination)
Sub sbCopyRangeToAnotherSheet()
'Method 1
Sheets("Team A").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B4:ACW9")
Sheets("Team B").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B11:ACW16")
Sheets("Team C").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B18:ACW23")
Sheets("Team D").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B25:ACW30")
Sheets("Team E").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B32:ACW37")
Sheets("Team F").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B39:ACW44")
Sheets("Team G").Range("B4:ACW9").Copy Destination:=Sheets("overview").Range("B46:ACW51")
'Method 2
'Copy the data
Sheets("Team A").Range("B4:ACW9").Copy
Sheets("Team B").Range("B4:ACW9").Copy
Sheets("Team C").Range("B4:ACW9").Copy
Sheets("Team D").Range("B4:ACW9").Copy
Sheets("Team E").Range("B4:ACW9").Copy
Sheets("Team F").Range("B4:ACW9").Copy
Sheets("Team G").Range("B4:ACW9").Copy
'Activate the destination worksheet
Sheets("OVERVIEW").Activate
'Select the target range
Range("B4:ACW9").Select
Range("B11:ACW16").Select
Range("B18:ACW23").Select
Range("B25:ACW30").Select
Range("B32:ACW37").Select
Range("B39:ACW44").Select
Range("B46:ACW51").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = True
End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

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