+ Reply to Thread
Results 1 to 6 of 6

Using IF, AND together with Start/End Dates

  1. #1
    Registered User
    Join Date
    04-01-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Using IF, AND together with Start/End Dates

    Hi,

    I'm new and found the forum because I need some help to figure something out.

    So I have task start and end dates and am trying to get the cells to automatically shade in the weeks in which the task is being done. I have set it up with conditional formatting so when there's a "Y" it will shade blue. How to get the "Y" is where I'm having trouble.

    So far I've tried the following 2 formulas and it's not working:
    =IF(AND($D82>=G$13,$E82<=G$12),"Y","N")
    =IF((G$13>=$D83),IF((G$13<=$E83),"Y","N"),"N")

    Hopefully this photo makes my problem more clear.

    Excel Date Question.JPG

    Any ideas would be very helpful!

    Thank you

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,657

    Re: Using IF, AND together with Start/End Dates

    To attach a Workbook <<<<<<<<<<<
    (please do not post pictures of worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    04-01-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using IF, AND together with Start/End Dates

    Thanks B. Johnson!
    That would make things a lot easier to understand indeed! Thanks for the tip. Have attached it now

    Test Workbook.xlsx

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,657

    Re: Using IF, AND together with Start/End Dates

    Seems to work:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-01-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using IF, AND together with Start/End Dates

    Forgot to mention that it works for some situations but not all - I've highlighted the boxes in red that should have been shaded blue but I can't figure out why it isn't.

    Most of the times it happens because the start date doesn't match up exactly with the week date (at the top). I had put the end of the week dates in when I was playing with the formula as I wasn't sure if that was having an impact...

    Quote Originally Posted by protonLeah View Post
    Seems to work:
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,657

    Re: Using IF, AND together with Start/End Dates

    G3 = 12/16/2013
    B8 = 12/19/2014
    C8 = 01/09/2014

    Therefore:
    =IF(AND(G$3>=$B8,G$3<=$C8),"Y","N") = False ="N"

+ 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. Pivot Group Dates - how to remove start and end dates from table
    By markoloughlin in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-21-2012, 04:19 AM
  2. Replies: 9
    Last Post: 03-05-2012, 08:17 AM
  3. [SOLVED] Start dates, end dates and # of Days
    By Stndsh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-18-2011, 11:59 PM
  4. Replies: 5
    Last Post: 06-30-2011, 03:26 PM
  5. Difference between Start and End dates
    By Dyzone in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2009, 08:43 AM

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