+ Reply to Thread
Results 1 to 4 of 4

Change font/color for entire row using OR statement

  1. #1
    Registered User
    Join Date
    02-25-2011
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2003
    Posts
    11

    Change font/color for entire row using OR statement

    Hello all. I've never used conditional formatting, so I need some assistance here...thanks in advance.

    In Excel 2003, I'm trying to change the formatting across a row if one of 5 cells in that row is "Y". How would that be done if D18, F18, H18, J18, or L18 are the cells that could contain this character? The row runs from column A to col. M, but may be extended further when necessary.

    And on that note, I'd need to apply this to multiple rows down the sheet in the same manner. Is there an easy way to apply this conditional formatting across the board?

    Again, thanks in advance.

    Chris

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Change font/color for entire row using OR statement

    Select the columns to format and go to Format|Conditional Formatting..

    Select Formula Is and then enter:

    =OR($D1="Y",$F1="Y",$H1="Y",$J1="Y",$L1="Y")

    or if the columns between can't have Y in them, use formula:

    =COUNTIF($D1:$L1,"Y")

    where the 1's represent the top most row you selected

    Click Format and choose colour
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Change font/color for entire row using OR statement

    hi, BuffaloSS, check attachment, that is done with conditional format
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-25-2011
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Change font/color for entire row using OR statement

    Thanks guys. Since none of the cells in between would contain a "Y", I used the "=count..." and it worked like a charm.

    Now, is there a way to "hide" cells or rows if a certain cell is empty, using a conditional? Can I use ISBLANK as a condition for formatting?

    What I've working on (attached) is a payment tracker for our contractors...when they provide an invoice, I run down the project as a whole and enter "Y" for the line items that we're being billed for. My issue is that I'm trying to protect my sheet from editing, and it's a bother for me to add rows for my coworkers when a project contains many more line items than I have in my base template (I currently have my template showing approx. 40 rows of line item/payment data...but most projects only use 20-25).

    While having an excess of rows is not prohibiting anyone from working, my problem is the sheet is "ugly" when there are that many extra rows that contain no data yet have a price of $0.00 in my payment columns...I'm using =if(D18="y",b18,0) which is copied down in columns E, G, I, K, M.

    I suppose that I could "hide" all of the cells that contain $0.00 by filling them with white when column A (work description) or B (price) contains no data, but the extra rows are still there. Would there be a better way?
    Attached Files Attached Files

+ 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