+ Reply to Thread
Results 1 to 13 of 13

Override conditional formatting

  1. #1
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Override conditional formatting

    Hi,

    I am looking to highlight a row depending on values of different cells within the same row.

    I have implemented conditional formatting but once one condition is met stays like that. I would like to change the formatting if Condition that I class Higher importance to override any others.

    A quick example:

    A4:M4 = Title Row

    Condition 1 - If there is value in cell H1 then highlight the row (A4:M4) "Green". If this condition is met please override any existing.

    Condition 2 : If Cell H1 >G1+30 then highlight the row (A4:M4) "Red". If previous condition is (condition 3 below) then override but do not override Condition 1.

    Condition 3: If cell D1 >C1+10 then highlight the row (A4:M4) "Blue". It can be over-ridden by condition 2 and 1.


    Any help would be much appreciated


    Many Thanks
    Last edited by greekboyuk; 03-02-2011 at 05:42 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Override conditional formatting

    In Excel 2003, Excel evaluates each condition and stops if it's met. In Excel 2007 and later, need to check off "Stop if True". So as long as you have the conditions in that order, it should work fine.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Override conditional formatting

    Hi Chemist,

    Thanks for your help. The problem that i have with the standard formatting though is if the user paste data form other workbooks with formatting it changes the conditional formatting colour. I cannot lock the cells as the users have to be able to enter rows and paste data. Any other way of doing the formatting please?

    Many Thanks

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Override conditional formatting

    It can be done with VBA. I'll see if I can get to that tomorrow.

  5. #5
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Override conditional formatting

    Chemist thank you very much I am very greatful

  6. #6
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Override conditional formatting

    Hi chemist

    Did you have some time to have a look for the vba code please?

    Many thanks

  7. #7
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Override conditional formatting

    Can anybody please help? I need to complete this project today and I just need the conditional formatting sorted.

    Many thanks

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Override conditional formatting

    Test this
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  9. #9
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Override conditional formatting

    Hi Royuk,

    Thank u very much for the code.I am still working on the project and I am goin grey.
    I made a little mistake in my cell range, sorry. All the cells are on row 4 and not row 1 which I can twea, however It looks like it is focusing on only one row. As the data will be in 3000 rows how that would work??obviously for each of the above statement when u moving to the next row the formatting will continue.

    Many thanks
    Greekboyuk

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Override conditional formatting

    You never mentioned multiple rows, your original request was for H1, etc.

  11. #11
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Override conditional formatting

    Condition 1 - If there is value in cell H1 then highlight the row (A4:M4) "Green".

    Condition 2 : If Cell H1 >G1+30 then highlight the row (A4:M4) "Red".

    Condition 3: If cell D1 >C1+10 then highlight the row (A4:M4) "Blue".
    Do you mean:

    1 - There is a value in any cell in H:H

    2 - Any in H:H > equivalent row in G:G + 30

    3 - Any in D:D > equivalent in C:C + 10

    ?
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  12. #12
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Override conditional formatting

    This might be right,
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Override conditional formatting

    Hi Roy,
    You are the master thank you even so much. I have tweaked your code and added some more conditions and it works perfectly. Thank u again I am amazed. Wanted to say thank u to everyone that tried to help to. Apologies for not responding I have been doin some 14 hours shifts at work and now I am so happy with your help.
    Off topic:
    Roy I am looking to learn Vba in extreme depth like u all have. Do u know whether there are any training material or even courses (preferably DVDs) that I can start developing my knowledge? I have had a look in one of lindas website (vba in depth) but it is not really in depth it isn't showing a lot. Could you or anyone else advise me?

    Thanks a lot again

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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