ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy cell backgound color to another cell (https://www.excelbanter.com/excel-programming/423540-copy-cell-backgound-color-another-cell.html)

John

Copy cell backgound color to another cell
 
I have a macro that color codes projects. I want to copy the cell text and
background color from one cell to another. I can copy just the name w/ the
following code:
ProjectName = Range(SumProjList)(i).Value ' pick up the proj name
.....
Range(ToTable)(2, 2).Value = ProjectName ' place name in another place
What do I have to add to copy the background cell color?

I appreciate your help, -John

John Bundy

Copy cell backgound color to another cell
 
Interior.colorindex gets the color
Range("A1").Interior.ColorIndex
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"John" wrote:

I have a macro that color codes projects. I want to copy the cell text and
background color from one cell to another. I can copy just the name w/ the
following code:
ProjectName = Range(SumProjList)(i).Value ' pick up the proj name
.....
Range(ToTable)(2, 2).Value = ProjectName ' place name in another place
What do I have to add to copy the background cell color?

I appreciate your help, -John



All times are GMT +1. The time now is 03:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com