+ Reply to Thread
Results 1 to 6 of 6

Color of Cell Equal to Color of Last Cell Above with Specific Value

  1. #1
    Registered User
    Join Date
    11-28-2013
    Location
    Excelland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question Color of Cell Equal to Color of Last Cell Above with Specific Value

    Hello,

    this is my first post.

    I have the following problem:

    I used conditional formatting to color-code rows with a specific value in column D.

    If the value of the cell of a row in column D is "Pending", the background of that row is orange;
    if the value is "Closed", the row becomes red;
    if it's "Deleted", the row turns yellow;
    and if it's "Transfer", the row becomes green.

    What I want to happen now is the following:
    If the value of the cell in column D is "Additional file", I want the row to turn either red ("Closed") or orange ("Pending") according to which one of these two values/colors was used last.

    These rows should never be yellow or green.

    What is the best way to achieve this?

    I attached a file in which I only added the color-coding so far.

    Thanks
    bondingfortoday
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Color of Cell Equal to Color of Last Cell Above with Specific Value

    Hi and welcome to the forum

    Rather than create a series of complex formulas in CF, I suggest you create a helper column (I used H in your sample) and copy this down...
    =IF(AND(D2="additional file",D3="additional file"),F2,IF(D3="additional file",D2,D3))

    Then base the CF on that instead of D (you can hide the helper if you want.
    If you want to build that into the CF rules, that is also an option, but Im not sure if this will cover all options. Add 2 extra rows above the table 1st, then use something like...
    =IF(AND($D4="additional file",$D5="additional file"),$F4,IF($D5="additional file",$D4,$D5))="Pending"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-28-2013
    Location
    Excelland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question Copy Down Previous Value from Above if Formula Returns Blank Value?

    Thanks for your reply and the warm welcome.

    So far I created a helper column that gets assigned different values.
    When the formula returns a blank ("") value, I would like that cell to copy down the previous value from the cell above.

    Is it possible to put two formulas into a cell?

    The first formula so far is:
    =IF($D2="Closed","C",IF($D2="Pending","P",IF(OR($D2="Deleted",$D2="Transfer",$D2="Additional file"),"")))

    The second one should do this:
    If the first formula returns a blank value, copy value from cell above.

    How could I do this?

    I attached another file showing what I have done so far.

    Thanks again for your help.
    Attached Files Attached Files
    Last edited by bondingfortoday; 11-29-2013 at 03:26 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Color of Cell Equal to Color of Last Cell Above with Specific Value

    I added my initial formula into column G, and then added a modified version of your column H formula , into column J

    I think if you base the CF on column G, youy should be good to go
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-28-2013
    Location
    Excelland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Color of Cell Equal to Color of Last Cell Above with Specific Value

    Thank you very much. That solved my problem.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Color of Cell Equal to Color of Last Cell Above with Specific Value

    Happy to 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: 4
    Last Post: 12-29-2013, 11:41 PM
  2. [SOLVED] color cell when another cell is equal to specific work
    By graiggoriz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2013, 12:09 PM
  3. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  4. Color cell with not equal values
    By vijay2482 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2009, 05:22 AM
  5. Set Bkg Color if cell value is less than or equal to -14
    By moglione1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2006, 06:55 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