+ Reply to Thread
Results 1 to 6 of 6

conditional formatting & AND function

  1. #1
    Registered User
    Join Date
    03-21-2014
    Location
    nyc
    MS-Off Ver
    Excel 2013
    Posts
    2

    Question conditional formatting & AND function

    i've been reading up on this for a few days, and cannot figure out how to write a simple line of code.

    goal:
    when there is no date entry to the right of a cell AND no entries in the row below the cell AND the date in the cell is 3 or more days ago, turn light blue.
    when there is no date entry to the right of a cell AND no entries in the row below the cell AND the date in the cell is 7 or more days ago, turn DARK blue.

    using cell G2 as a starting point, i keep failing in CF with syntaxx like:

    =AND(H2:Z2="",A3:Z3="",TODAY()-G2>=3)

    and then i figured i'd make a new rule and apply the '7' with different formatting.

    but i can't decode the failure of that line^. and i've been using the 'blank' where i'd ideally use 'no date' because i'd like to incorporate other text, i just don't know if that's actually a thing that is possible.

    i feel like i'm close, but,

    frustrated....

    help?

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: conditional formatting & AND function

    you need to create two rules

    =AND(H2="",G3="",G2<=TODAY()-3,G2<>"")
    =AND(H2="",G3="",G2<=TODAY()-7,G2<>"")

    what range do you want to apply to and what cells would that be testing - i ask as that will depend on if there needs to be a $ in the formula

    can you attach a sample sheet with examples of what you need

    for 2007 or 2010 excel version
    Conditional Formatting

    Highlight applicable range >>
    select the range you want to apply to, Note this may be required to add $ to formula

    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:

    =AND(H2="",G3="",G2<=TODAY()-3,G2<>"")

    Format… [Number, Font, Border, Fill]
    choose the format you would like to apply when the condition is true
    OK >> OK

    repeat for next for frmula
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: conditional formatting & AND function

    If there are texts but no numbers then no dates (which are in fact numbers in Excel) condition could look like:

    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: conditional formatting & AND function

    Maybe:
    Please Login or Register  to view this content.
    Quang PT

  5. #5
    Registered User
    Join Date
    03-21-2014
    Location
    nyc
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: conditional formatting & AND function

    i'm sorry - i got that close, but not quite right.

    applying the rule to all of col G, maybe 500 entries long, but using cell G2 as the example: (because G1 is the heading, and the formula is not applied)

    when there is no date entry anywhere to the right of a cell AND no entries in the entire row below the cell AND the date in the cell is 3 or more days ago, turn cell G2 light blue.
    when there is no date entry anywhere to the right of a cell AND no entries in the entire row below the cell AND the date in the cell is 7 or more days ago, turn cell G2 DARK blue.

    thank you all for jumping on this.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: conditional formatting & AND function

    What do you mean with "no date entry"? is it possible with text or number?
    Anyway, can you upload an example with errors from my formula?

+ 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. Conditional formatting using MAX function
    By yardenon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-26-2013, 12:09 PM
  2. Conditional Formatting with IF function
    By navneetvyas in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-05-2013, 03:36 AM
  3. Replies: 3
    Last Post: 01-30-2011, 07:40 AM
  4. Conditional Formatting - IF Function?
    By Jings in forum Excel General
    Replies: 5
    Last Post: 06-08-2009, 01:01 PM
  5. Conditional Formatting (IF function)
    By Neo1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-02-2006, 06:38 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