Code to copy cell borders and fill color from one cell to another

C

Chuck M

Can someone point me in the right direction? I need to copy only the cell
borders and fill color from one cell to another. I do not want to copy the
contents of the cell, only borders and fill color.
 
M

mikearelli

You can select the cell to copy, right-click and select copy, then select the
cell to paste to, right-click and select Paste Special then choose formats.

Or:
Range("B38").Select
Application.CutCopyMode = False
Selection.Copy
Range("B35").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
 
C

Chuck M

Mike,

This is perfect. I needed the VBA solution (although I failed to mention
that in my original post).

Thanks and Happy New Year!
 
M

mikearelli

That's a clumsy 'Recorded Macro' version of the code. You may be able to
streamline it a bit. I love being able to record macros then manipulate the
clumsy code. It's a whole lot better than fumbling through the 'intuitive'
help screens Microsoft provides.
 
J

Jamie

Mike,

Is there any way I can do this, but excluding color?

I need a way to copy the borders and font format, but not the shading.

Any help appreciated!
 

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

Top