Copy a Range and it Font Color

rudevincy

Active Member
Joined
Feb 21, 2005
Messages
417
I have a worksheet where I copy a range. In the range is data that using conditional formatting changes it font color to red or black based on a criteria.

Is it possible to copy the color of the font in the range as well??

This is the code I use to copy the range from one worksheet to the next



'Copy the data needed

Worksheets("SheetCP").Activate
Worksheets("SheetCP").Range("V3:V45").Value = Worksheets("SheetRP").Range("J11:J53").Value
Worksheets("SheetCP").Range("W3:AA45").Value = Worksheets("SheetRP").Range("L11:P53").Value


PLEASE HELP!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
It's very tricky copying the colour of a cell if it was put there by conditional formatting. If you know the condition which made the source cell that colour, it's much easier to apply the same test to your target cell and change its .Font.Color property if necessary.

Have I explained that clearly? It made sense as I was typing it!
 
Upvote 0
Ok so there are two ranges Sample1 and data2 so I can say

if Range("Sample") < 30 then Range("data2").Font.Color = Red
else
Range("data2").Font.Color = Black
End if
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,400
Members
448,893
Latest member
AtariBaby

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