colour copy, vba colour copy, conditional formatting problem between two worksheets

MrSak87

New Member
Joined
Jan 8, 2015
Messages
44
ey experts,

This one is difficult to explain

1)On sheet1 after running a macro from an imported excel file, I have a single row with 5 columns which gives me an analysis of the data I've imported. From this analysis a simple conditional formatting flags up three possibilities and colours them: yellow, purple or leaves blank.

2)I then have another macro which copies this row into another worksheet (sheet2).

3)I then repeat step one which puts the results of the analysed data into the same row as before (sheet1).

4)I then repeat step two which pastes this row of data BELOW the one beforehand in (sheet 2)

This goes on and on I literally have hundreds of rows

The catch is the conditional formatting will change every time I import a new piece of data so which ever way I paste it into sheet 2 the formatting is wrong. Is there a way in VBA or otherwise to copy the colours generated by the conditional formatting and paste them in permanently so they won't be altered by the next file I import?

I'm also using excel 2003...

Thanks for any help
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
only successful way (that I have used) is to paste into word, then back into excel. I've never seen a better working answer
 
Upvote 0
It's just a simple copy - paste job

Sub analys()


Range("A41:w41").Select
Selection.Copy
Sheets("Analysis").Select
Range("A2").Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

End Sub


Thank you for the reply!
 
Upvote 0
No, if I copy the formats the conditional formatting will mess up when I import the next file. I somehow need to copy the colours given by the conditional formatting. and paste them permanently with the data on the next sheet. So that when I import the next set of data these colours are unaffected

The manual way is to see that E41:G41 are yellow, then to change onto the work sheet and manually change the colours for those rows before importing. The chances of manual error here are high which is what I'm trying to avoid!
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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