A further question.
There is some color formatting on sheet 2 that needs to go to sheet
3 when the code is run.
I suppose it will take something like this...
.PasteSpecial Paste:=xlPasteFormats
but I can't figure where to add it in. Tried a place or two but
errors out or won't compile.
So basically want to keep the formatting for whatever was on sheet2
that gets moved to sheet 3.
The Sub ColumnsCompareTwo copies entire sheet 2 to sheet 3 and then
eliminates much of it where does not match etc. That seems to me
to be an even bigger challenge.
However, I cannot figure how to carry formatting to sheet 3.
I am inquiring as to whether the formatting is conditional
formatting or on sheet fill. I suspect that will make a difference
in the coding.
Howard
Perhaps...
If you assign the range to a range object...
Set rngSource = Sheets("Sheet2").Range("A2:Z" & LRow2)
..then you can just copy the row with all formatting...
If MyArr1(i, 1) = MyArr2(ii, 1) Then
Application.Index(rngSource, ii, 0).Copy _
Sheets("Sheet3").Cells(Rows.Count, 1).End(xlUp)(2)
Exit For
End If
If the rows on the target sheet are empty then you don't need to
..Resize()
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion