PC Review


Reply
Thread Tools Rate Thread

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

 
 
Chuck M
Guest
Posts: n/a
 
      28th Dec 2007
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.
--
TIA
Chuck M.
 
Reply With Quote
 
 
 
 
mikearelli
Guest
Posts: n/a
 
      28th Dec 2007
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

"Chuck M" wrote:

> 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.
> --
> TIA
> Chuck M.

 
Reply With Quote
 
Chuck M
Guest
Posts: n/a
 
      28th Dec 2007
Mike,

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

Thanks and Happy New Year!
--

Chuck M.


"mikearelli" wrote:

> 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
>
> "Chuck M" wrote:
>
> > 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.
> > --
> > TIA
> > Chuck M.

 
Reply With Quote
 
mikearelli
Guest
Posts: n/a
 
      28th Dec 2007
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.

"Chuck M" wrote:

> Mike,
>
> This is perfect. I needed the VBA solution (although I failed to mention
> that in my original post).
>
> Thanks and Happy New Year!
> --
>
> Chuck M.
>
>
> "mikearelli" wrote:
>
> > 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
> >
> > "Chuck M" wrote:
> >
> > > 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.
> > > --
> > > TIA
> > > Chuck M.

 
Reply With Quote
 
Jamie
Guest
Posts: n/a
 
      10th Jan 2008
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!

"mikearelli" wrote:

> 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
>
> "Chuck M" wrote:
>
> > 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.
> > --
> > TIA
> > Chuck M.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Microsoft Excel Misc 0 29th Jun 2009 11:20 AM
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Yuvraj Microsoft Excel Misc 0 26th Jun 2009 06:01 PM
dynamically copy cell content and fill color John Keith Microsoft Excel Discussion 5 24th May 2007 03:43 PM
Cell fill color. Row to match specific cell. =?Utf-8?B?Q0FEaW5EYWxsYXM=?= Microsoft Excel Programming 3 4th Jan 2006 01:00 PM
Re: Cell fill color automatically changes when you leave cell Frank Kabel Microsoft Excel Misc 1 11th Mar 2004 04:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 PM.