+ Reply to Thread
Results 1 to 14 of 14

Conditional Formula

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Conditional Formula

    Hi,

    I'm trying to write a conditional formula for when C10="Y" and N10>5, the font turns red. This is what I have and I keep getting an error:

    =IF(C10="Y",IF(N10>5))
    Thank you

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formula

    =and(c10="y",n10>5)

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    Thank you!

    Sorry I forgot to add that I also want it to turn red if C10=" " and N10>10.

    Would it be something like this?

    =AND(C10="y",N10>5)OR C10=" ",N10>10)

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formula

    =OR(AND(C10="Y",N10>5),AND(C10=" ",N10>10))

    I think... Not tested it.

  5. #5
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    That didn't work right. It made numbers red that were under 5.

  6. #6
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    Could it be because I have my font set as "0;[Black]0?"

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formula

    It works for me. Could you post some dummy data in a worksheet where it's not working?

  8. #8
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    Everything is red.
    Attached Files Attached Files

  9. #9
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formula

    Your data doesn't start on row 10, it starts on row 4.
    Change the conditional formatting formula to =OR(AND(C4="Y",N4>5),AND(C4=" ",N4>10)) and see if that works.

  10. #10
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    I just realized I was referencing the wrong cells in the top formula, but I fixed that and dragged the formatting through all the cells and it still didn't work.

  11. #11
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    I checked the top row and did 21 days and it's still not red.

  12. #12
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formula

    OK, after a little digging around, I've found the problem. Your NETWORKDAYS formulas in column N appear to be the wrong way round. i.e. you have them end date to start date rather than start date to end date. This gives negative results and therefore the conditional formatting doesn't fire.

    Try this in N4 and copy down:

    =IF(L4=0,"",IF(ISNUMBER(Q4),NETWORKDAYS(L4,Q4),NETWORKDAYS(L4,TODAY())))

    Does that work?

  13. #13
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditional Formula

    It works!! Thank you so much for your help with this! Made my day a lot better.

  14. #14
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formula

    No problem. Happy to help.

    Please mark the thread as solved if you're happy you have a full solution.

    BSB.

+ 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: 3
    Last Post: 11-28-2013, 02:11 AM
  2. Replies: 15
    Last Post: 04-10-2012, 07:30 AM
  3. Changing conditional average formula to conditional sumproduct
    By chlor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2007, 11:39 AM
  4. [SOLVED] Conditional Formula to indicate Formula in cell
    By SteveW in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 08-01-2006, 08:15 PM
  5. [SOLVED] How do I do a complex conditional in a conditional formatting formula
    By Ray Stevens in forum Excel General
    Replies: 6
    Last Post: 03-12-2006, 06:30 PM

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