+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting - copy and paste

  1. #1
    Registered User
    Join Date
    07-03-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    2

    Conditional Formatting - copy and paste

    Hey everyone,

    Looking for some help

    I've simplified my problem down for ease of understanding.

    I have a conditional format set up that colours a range of cells (Say A2:D5) based on the value in A1. The formula reads as follows =if($a$1=1,true) for range A2:D5 and it works fabulously, especially as I want to be able to insert a column between, say, B and C, and have the cells in rows 2-5 in that column also catch the format based on the value in A1.

    Problem:
    Now I want to copy and paste this range (A1:D5) to E1:H5 in such a way that the conditional format for E2:H5 is determined by the value in E1 (and again over and over for multiple blocks). However when I copy and paste, the conditional format rule still refers to A1.

    I tried removing the dollar signs in the rule to =if(a$1=1,true). The copy then works (as one would expect) and the E2:H5 rule refers to E1 as I hoped, but then only the cells A2:A5 (and E2:E5) change colour, as the cells in B2:D5 (and F2:H5) are looking for a similar value in B1, C1 and D1 (and F1, G1 and H1). I can't just have the same value in each of those cells (and it seems ridiculous to have to do that), because I want to be able to insert a column in any of these blocks and have the conditional format in that block catch it without having to copy and paste that number in.

    I hope I've been clear enough as to the problem. Thank you in advance for any ideas anyone has.

    Gavin

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional Formatting - copy and paste

    Welcome to the forum!

    I've simplified my problem down for ease of understanding.
    Not a good idea, to be honest. Experience tells us that it's better to see the REAL set-up.

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-03-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    2

    Re: Conditional Formatting - copy and paste

    Thank you for getting back so soon. I have attached a simple spreadsheet, if someone can get it to work on this, I can implement that on my full sheet.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional Formatting - copy and paste

    The only way is to create rules for each of the four race columns that refer to C$13, so 20 rules in total, then you can copy the blocks across.

    Your rule is unnecessarily long - this will suffice:

    =C$13=5

+ 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. Copy Paste Conditional Formatting
    By gwflyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2016, 05:34 PM
  2. [SOLVED] Copy and paste without Conditional Formatting
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-17-2015, 01:38 AM
  3. Copy/Paste - without Conditional Formatting
    By timothyjquinn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2013, 01:12 PM
  4. [SOLVED] Copy & paste conditional formatting?
    By Ltat42a in forum Excel General
    Replies: 15
    Last Post: 10-02-2012, 01:55 AM
  5. Excel 2007 : conditional formatting: Copy/Paste
    By blizz in forum Excel General
    Replies: 4
    Last Post: 04-07-2011, 08:57 AM
  6. Conditional Formatting Copy & Paste
    By adam2308 in forum Excel General
    Replies: 2
    Last Post: 06-07-2010, 06:03 PM
  7. Copy paste Conditional Formatting
    By Bud Hughes in forum Excel General
    Replies: 3
    Last Post: 10-01-2005, 07:05 PM

Tags for this Thread

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