+ Reply to Thread
Results 1 to 8 of 8

Copy conditional formatting with relative data

Hybrid View

  1. #1
    Registered User
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel for Mac 2011
    Posts
    12

    Question Copy conditional formatting with relative data

    Hello,

    I'm hoping someone here can help me out...

    See attachment.
    If 'time used' is >= 'time available', the cell 'time used' has to be colored red
    If 'time used' is 0, the cell 'time used' has to be colored green
    Everything in between 0 and 'time available' has to be colored between green and red (yellow, orange,…)

    I’m able to do this cell by cell but it seems to be impossible to copy the conditional formatting to other cells because it always seems to refer to A2 instead of A3, A4,…

    I have more than 200 lines like this so manual would take ages.

    Can someone maybe tell me how to do this?

    Thanks a lot in advance!

    Sophie
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Copy conditional formatting with relative data

    Remove absolute references (the $ signs) in your CF formulas
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel for Mac 2011
    Posts
    12

    Re: Copy conditional formatting with relative data

    Thanks for your quick reply.
    Actually I don't use a formula but rather a number and a value. See image below:
    excel.jpg

    When I remove the absolute references in that value-field, I get an error message.

    I also notice that I'm doing something wrong because I notice that how I do it now, only 3 colors are used (green, yellow and red), no orange or variations like you normally see with conditional formatting.
    So I guess I'm not doing that the correct way either...

    Any more advice?

    Thanks in advance!

  4. #4
    Registered User
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel for Mac 2011
    Posts
    12

    Re: Copy conditional formatting with relative data

    In attachment you can find a sample file.
    Attached Files Attached Files

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Copy conditional formatting with relative data

    See attached. I used 3 CF rules and extended the range to cover B2:B6

    You may choose to delete the first two rules

  6. #6
    Registered User
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel for Mac 2011
    Posts
    12

    Re: Copy conditional formatting with relative data

    Thanks but it's not completely yet what I have in mind.
    The CF of the B-cells still refer to A2 while it has to be rather like this:

    - B2 refers to A2, B3 refers to A3, B4 refers to A4,...
    - And I need a way to copy that CF to 200 lines or so...

    Do you understand what I mean?
    Last edited by Sophie10; 01-13-2015 at 11:23 AM.

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Copy conditional formatting with relative data

    Nah..not sure you can do that. A bit of a workaround although not ideal..

    Use a helper column, which will eventually end up being formatted since the graded scale does not allow other ranges to be formatted.

    See attached. Col C is the helper column being formatted with the 3 CF rules

  8. #8
    Registered User
    Join Date
    08-17-2010
    Location
    London
    MS-Off Ver
    Excel for Mac 2011
    Posts
    12

    Re: Copy conditional formatting with relative data

    Thanks a lot for your help! I can live with the helper column on itself but it doesn't seem to work either for the following reasons:

    - The colors still aren't like I want them. For example C2 should be dark orange instead of yellow, C5 should be yellow instead of red and C3 should be red instead of green (preferably not as red as when 'time used' > 'time available')...
    - It's also not ideal that some cells in column C have numbers in it and some not...

    Maybe you or someone else has another suggestion?
    Last edited by Sophie10; 01-13-2015 at 11:53 AM.

+ 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. Conditional Formatting using Data Bars giving me Relative Reference Error
    By excelstudent74 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2013, 12:58 PM
  2. Conditional formatting with a relative cell.
    By roontoon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2012, 07:05 PM
  3. Excel 2007 : Relative reference conditional formatting
    By Tsaukpaetra in forum Excel General
    Replies: 2
    Last Post: 01-19-2010, 07:41 PM
  4. [SOLVED] Conditional Formatting with Relative Reference.
    By Swiatkowski Peter in forum Excel General
    Replies: 1
    Last Post: 12-15-2005, 11:15 PM
  5. Conditional Formatting Bug w/ relative formula?
    By Joe HM in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2005, 07:06 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