+ Reply to Thread
Results 1 to 5 of 5

Populate a cell based on a date range

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    14

    Populate a cell based on a date range

    I have two columns that have the start and end date of the corresponding activity. Across the top of my spreadsheet I have Week ending dates. What I would like to do is check and see if my week ending date falls in that start and end date range. If it does, I want to put a number "1" in a corresponding cell. So if E4 is between the dates in C4 and D4, then put a "1" in F4. If not, leave it null.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Populate a cell based on a date range

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Registered User
    Join Date
    08-21-2007
    Posts
    14

    Re: Populate a cell based on a date range

    Sure thing. I've attached a dummy sheet. So in this example, I would like to have a "1" or "x" in cells E3 through H3 for Activity 1 because those weeks fall within my date range from C3 & D3.
    Attached Files Attached Files
    Last edited by arthurbr; 09-25-2010 at 03:42 PM.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Populate a cell based on a date range

    Does the attached help ?
    ( it is not necessary to quote entire posts, it makes threads hard to read)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-21-2007
    Posts
    14

    Re: Populate a cell based on a date range

    That works great except for 2 things: For some reason, it always excludes the last week ending in the range. For example, if the end date is 12/25, it does place an "x" in the week ending 12/31. Also, if the start and end date are the same day or one day apart, it doesn't populate anything.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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