+ Reply to Thread
Results 1 to 8 of 8

Conditional Formatting using formulas

Hybrid View

  1. #1
    Registered User
    Join Date
    11-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional Formatting using formulas

    Hi,

    I'm using Excel 2007.

    I've been looking for a way to use formulas in order to do conditional formatting.

    I'd like to format a whole line in "Bad" or "Good" depending on the value of one cell of this line ("Bad" for a "X", "Good" for a "V")

    I use OpenOffice Calc at work, and it got a STYLE() function that is very convenient to use : STYLE( IF( test; "Style1"; Style2" ) )

    I can't find a similar function in Excel, do you have any idea on how I could do that ?


    Thanks a lot !

  2. #2
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Conditional Formatting using formulas

    Hi

    Have you got a sample worksheet without confidential information that you can post.

    Chris
    Click my star if I helped Thanks

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Conditional Formatting using formulas

    Try

    Conditional Formatting
    • Highlight applicable range >> A1:X100
    • Home Tab >> Styles >> Conditional Formatting
    • New Rule >> Use a formula to determine which cells to format
    • Edit the Rule Description: Format values where this formula is true: =$X1="Bad"
    • Format… [Number, Font, Border, Fill]
    • OK >> OK

    Now add a second condition for =$V1="Good"
    HTH
    Regards, Jeff

  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
    53,048

    Re: Conditional Formatting using formulas

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  5. #5
    Registered User
    Join Date
    11-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting using formulas

    Thanks a lot jeffreybrown you got it right !
    It worked but I wonder why I can't use the default styles ("Good", "Neutral" and "Bad") with this rule ?





    I'm sorry I guess I wasn't clear enough, so here's a sample file
    Babouh_Worksheet_sample.xlsx

    When I put a "V" in "Available" I want the whole line to change format to "Good" (Green default format)


    Before I set the thread to "solved", anybody knows how I could use the "Good", "Neutral" and "Bad" styles with the conditional formatting ?


    Thanks again !
    Last edited by Babouh; 11-17-2012 at 02:54 PM.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Conditional Formatting using formulas

    Conditional formatting will not accept the array format, i.e., {"Good","Neutral","Bad"}.

    You will have to set three conditions.

  7. #7
    Registered User
    Join Date
    11-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting using formulas

    Okay, I entered the RGB values of the 6 colours (filling and text) in my rules. It was a pain but at least now it looks good..

    How come they didn't think one second we would want to use their predefined formats to do conditional formatting ?


    Thanks for your time !

    -> [SOLVED]

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Conditional Formatting using formulas

    Beats me why they did some things they way they did????

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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