Excel VBA for cell colour format to carry over to another sheet

Joined
May 20, 2021
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
I have a sheet, let’s call it “Results”.
On this sheet there are many columns for each category: “Science”, “Math” and so on so forth.
each individual student are named on the rows.

Eg: Working Sheet
Science Math
Student A 70(LGreen) 20 (Red)
Student B 66.5(LYellow) 45.68(Dark Yellow)
…..
Student Z 10(Red) 10 (Red)

Hopefully any helpful souls can visualise this.

I am given this sheet with the cells coloured based on some macro that I am not informed of (confidentiality).

I have a set of macros that automatically ranks each student based on their overall score. But when I use the macro, all the colour fills disappear. (I want to keep the colour fill for the final sheet, is there a code that copies the colour codes from the working sheet to this final sheet?)

Eg: Final Sheet
Science Math
Student F 96 92
Student D 91 86
…..
Student Z 10 10

Student F had DarkGreen for both Science and Math
Student D had DarkGreen for Science and Lightgreen for Math
Student Z had both Red.
But on the final sheet it is not coloured.

Any idea how I can do this? Much thanks appreciated for any help!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
tldr; can I carry over the colour fills for the cell values on one sheet over to another even though the arrangements are different for both? (Cell values are exactly the same though)
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,088
Members
453,021
Latest member
Justyna P

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