+ Reply to Thread
Results 1 to 6 of 6

Adding 10 days to given date

  1. #1
    Forum Contributor
    Join Date
    04-02-2013
    Location
    Hollywood, Fl
    MS-Off Ver
    Excel 2010
    Posts
    110

    Adding 10 days to given date

    Hello all,
    This is my first time using an Excel Forum for a question, but I can't seem to get my head around how I would go about adding 10 days to a date provided via a data pull. After I complete my data pull, I'm given a bill stop date. The actual service cutoff date should be 10 days after the bill stop date provided. I need to create an if statement that first checks to see if there is a date within the cell, and if there is a date, the formula should add 10 days to that date which would then become the service cutoff date. I am suffering from a terrible case of formula block and I can't seem to figure out the best way to go about writing this formula. Any help would be greatly appreciated. Thanks!

    D.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Adding 10 days to given date

    Well, a formula can't exactly tell if a cell value is a DATE persay..
    Because dates are just numbers incrimenting by 1 from jan 1 1900.
    Today April 2 2013 is 41366

    But you can test if it's a numeric entry, or if it's just "not blank"

    Try

    =IF(A1<>"",A1+10,"")
    Or
    =IF(ISNUMBER(A1),A1+10,"")

    Where A1 is the cell with your given bill stop date.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Adding 10 days to given date

    Hi and welcome to the forum

    Just a quick note...if you are getting your data from an external source, the values (dates and numbers) may actually be text that just looks like a number - you need to check for that 1st by using =isnumber() on some of the cells in a row...FALSE indicated text
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    04-02-2013
    Location
    Hollywood, Fl
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Adding 10 days to given date

    Thanks so much for your help Jonmo1. The first formula worked great. Thanks a lot. But I forgot to mention, how would I add to that formula if I needed to check dates within multiple columns? Basically, first I check to make sure there is a value within the cell, if not then I need to check a different column, if the cell within that column is blank as well, then I would go on to a third column for a date. There are four possible dates to choose from provided the cell within that column has a value in it. If not, then teh formula needs to move on to the next possible column. Am I making sense?



    Quote Originally Posted by Jonmo1 View Post
    Well, a formula can't exactly tell if a cell value is a DATE persay..
    Because dates are just numbers incrimenting by 1 from jan 1 1900.
    Today April 2 2013 is 41366

    But you can test if it's a numeric entry, or if it's just "not blank"

    Try

    =IF(A1<>"",A1+10,"")
    Or
    =IF(ISNUMBER(A1),A1+10,"")

    Where A1 is the cell with your given bill stop date.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Adding 10 days to given date

    Can you be specific?

    which cells exactly (column and row) may contain the date you're looking for?
    What if more than one of those cells contains a date, which one do you want to use, the first one, last one?

  6. #6
    Forum Contributor
    Join Date
    04-02-2013
    Location
    Hollywood, Fl
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Adding 10 days to given date

    The data contains four types of dates. Create Date, Bill Stop Date, Schedule Date, and Completion Date. The bill stop date is the primary date being used. The company will have 10 days from the bill stop date to try and retain the customers. 10 days after the bill stop date would be the cutoff date. The issue is not every row has a bill stop date, schedule date, or completion date. So I need to first check to make sure there is a value within the cell, if there is, then I am to add 10 days to that date in order to create a cutoff date. Sometimes the row will contain a bill stop date, and in other rows the bill stop date is blank. When this occurs I then need to see if there is a schedule date within the row, if there is a schedule date, but no bill stop date, then I am to add 10 days to the schedule date. If there is no schedule date, or bill stop date, then I check to see if there is a date within the completion date column. Typically if there isn't a date within the bill stop date column, there won't be any dates within the schedule date, or completion date columns, but I still need to check to make sure. Finally, if there is no bill stop date, schedule date, or completion date, then I am to use the create date and add 10 days from that date, but the create date would only be used as a last resort. If more than one cell have a date, then the bill stop date should be used over all others. Priorities are bill stop date, schedule date, completion date, and then create date.

+ 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