+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    03-06-2010
    Location
    London
    MS-Off Ver
    Office XP Pro
    Posts
    3

    Lightbulb Excel Conditional Formatting Help

    I have been using the below formula to highlight all dates within the next 30 days.
    =AND(E28-TODAY()>=0,E28-TODAY()<=30)
    Although it's working fine, I want to tweak it.

    In cell E28, I will now be entering a due date. I'm looking for a formula that will recognise that date and highlight all dates elsewhere on my page that are up to 30 days before that date.

    I'm a bit out of my depth here, and when I tried =AND(E28-DATE(dd/mm/yyyy)<=0,E28-DATE(dd/mm/yyyy)>=30) it tells me I need more agruments.

    Any help would be appreciated.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Excel Conditional Formatting Help

    Your original CF construct looks good. Are the values in all the date cells regular Excel date values? If so, you shouldn't need to apply formatting to your formula.

    If the range of cells to evaluate were A1:A100, then this would be the process:

    1) Highlight A1:A100
    2) Apply this CF formula:

    =AND($E$28-A1>=0,$E$28-A1<=30)

    The formula will adjust itself for all the cells applied.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-06-2010
    Location
    London
    MS-Off Ver
    Office XP Pro
    Posts
    3

    Re: Excel Conditional Formatting Help

    Quote Originally Posted by JBeaucaire View Post
    Your original CF construct looks good. Are the values in all the date cells regular Excel date values? If so, you shouldn't need to apply formatting to your formula.
    Yes, they are all set to date values but there are eight columns containing dates relating to different things and I only want five of those columns to be included. (if that makes sense)

    ie

    A B C D E F G H I J

    Columns C to J contain dates, I plan to enter a due date for invoice payment in E28 and I want any dates elsewhere in E G H I and J only, to be highlighted red if they are 30 days prior to the due date.
    I basically want to swop the 'today' bit in the working formula for a fixed date if that is possible to do.
    Just not sure if that effects the A1 part of the formula you've kindly put up.

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Excel Conditional Formatting Help

    Then use the technique I described above. You'll have to do it twice.

    1) Highlight range E1:E100

    =AND($E$28-E1>=0,$E$28-E1<=30)

    2) Highlight range G1:J100

    =AND($E$28-G1>=0,$E$28-G1<=30)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    03-06-2010
    Location
    London
    MS-Off Ver
    Office XP Pro
    Posts
    3

    Re: Excel Conditional Formatting Help

    Will do,
    Thank you kindly

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.2.0