+ Reply to Thread
Results 1 to 6 of 6

Copy Cell background & font colors between cells without changing receiving cell borders

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Copy Cell background & font colors between cells without changing receiving cell borders

    I have a macro set up to copy paste "formats only" from one cell to a receiving cell. Is there a way I can copy all formats except the borders. I'm writing code to run a tournament and the bracket borders are being changed when ever I do the past/special formats option.

    I have so many cells I have to change that it is impractical to set up conditional formatting.

    Thanks for any help.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copy Cell background & font colors between cells without changing receiving cell bord

    You can't select an attribute to omit, but you can select which ones you want to copy. What are the formatting attributes you are interested in? Instead of using Copy then PasteSpecial you will have to do something like this, for example, to copy font color, font bold, and fill color:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copy Cell background & font colors between cells without changing receiving cell bord

    Quote Originally Posted by pongmeister View Post
    I have so many cells I have to change that it is impractical to set up conditional formatting.
    I missed this the first time. The number of cells has nothing to do with how much effort it is to set up conditional formatting, and I suspect this is going to be your best bet. It may be that conditional formatting is simpler than you think. Can you provide a sample file and give more details about your criteria for formatting?

  4. #4
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: Copy Cell background & font colors between cells without changing receiving cell bord

    Hi 6StringJazzer,

    Thanks for the fast and exactly what I need solution. I tested it now and it worked perfectly. You have saved me a great deal of time and complex coding.

  5. #5
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: Copy Cell background & font colors between cells without changing receiving cell bord

    I'm not an expert but I have setup a lot of conditional formatting and have a fair grasp. However, I'm running a 32 team double elimination and am coloring each teams brackets with a unique color/font combination. So on the initial matches it's easy to set up conditional formatting so when first match ends you have to check the color on either the loser or winner and set it in the next round accordingly. But on the next round there are 4 teams that could possibly be the winner and loser. Then the next round you have 8 teams possibly reaching the bracket. until you get to where you have to have check for 32 teams in the final match.

    Actually, your first solution is exactly what I need. I was doing a copy paste special (Formats). That gave me the background and font colors correctly but messed up the borders on the receive cell. Your solution above solves the issue and makes it simpler than using conditional formatting.


    I'm attaching my workbooks to let you see what would be involved, but I wouldn't spend too much time on it since your first solution works so well.

    I control who won/lost each match in the DoubleElimDrawSheet.xlsm book by entering results in the DoubleElimResults.xlsm book. I put "Upper" or "Lower" in column B on row where column A contains the Match ID (W1 thru W34) then my code puts the winner and loser in their next bracket (Loser goes to the Left side of the sheet and winners go to the right. The third book (DoubleElimEntries.xlsm) Contains the team entries and is used to load players to the beginning matches.

    The macro I use to copy/paste special colors and fonts is named "ExtrapolateColors"

    Thanks so much again.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: Copy Cell background & font colors between cells without changing receiving cell bord

    Hi 6StringJazzer,

    I submitted another issue with this string but I don't see it in the string now but that's just as well since I found the answer, so I am closing this thread now and thanks again for all your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 02-27-2018, 12:59 AM
  2. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  3. [SOLVED] Changing cell background color/borders function
    By tigfur in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 04-16-2016, 06:22 AM
  4. [SOLVED] Find Merged Cells and Format Cell Borders and Font
    By Lillian Bell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2015, 01:38 AM
  5. Replies: 1
    Last Post: 06-28-2012, 09:56 AM
  6. Assistance needed with case statement changing cell and font colors
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2009, 10:50 AM
  7. Replies: 1
    Last Post: 10-14-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1