Copy format from another Workshet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I tried to use this code to make it easy. But the macro failed at colorindex.

With Range("A:BF")
.Formula = Workbooks(ReforecastWorkbook).Sheets("ReForecast -
Detailed").Range("A:BF").Formula
.ColorIndex = Workbooks(ReforecastWorkbook).Sheets("ReForecast -
Detailed").Range("A:BF").Interior.ColorIndex
.Pattern = Workbooks(ReforecastWorkbook).Sheets("ReForecast -
Detailed").Range("A:BF").Interior.Pattern
End With

How can I combine all that ?

Nde
 
You're definately on the right track here, the only thing I can see is you
need to reference the ".interior" property before the .colorindex & .pattern
..... as in
"interior.colorindex" & "interior.pattern". Likely you will need both
spreadsheets open to run the code snippet. Addressing each column as a
range may not give you the results you are looking for if each cell in the
column has different formatting in which case you may need to address each
cell individually (just not sure)
Best
 
The Macro works, but not results ! Youe guess was the good one, cells have
different format !

How can I go through each cell ?

Nde
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top