+ Reply to Thread
Results 1 to 8 of 8

time and date formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-07-2015
    Location
    usa
    MS-Off Ver
    2010 mac
    Posts
    6

    time and date formula

    if cell b2 has "three months"
    if cell c2 has "1-1-15"
    what is the formula that would give me the answer "4-1-15" in cell d2?

    Screen Shot 2015-02-07 at 6.24.34 PM.png

  2. #2
    Registered User
    Join Date
    02-07-2015
    Location
    usa
    MS-Off Ver
    2010 mac
    Posts
    6

    Re: time and date formula

    B2 " three months" must be in a text format. Thanks for your help

  3. #3
    Registered User
    Join Date
    02-07-2015
    Location
    Colorado, United States
    MS-Off Ver
    2013
    Posts
    7

    Re: time and date formula

    Format B as a number, and then consistently use it for months. Then try putting this in D2 --

    Formula: copy to clipboard
    =DATE(YEAR(C2),B2+MONTH(C2),DAY(C2))

  4. #4
    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
    53,048

    Re: time and date formula

    @ neckty23, Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff)

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    @ chris, it sounds like B2 contains text (words), formatting as number will have no affect on it

    (also, if you just want to add x months to a date, try using =EDATE(c2,x) )
    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

  5. #5
    Registered User
    Join Date
    02-07-2015
    Location
    usa
    MS-Off Ver
    2010 mac
    Posts
    6

    Re: time and date formula

    @FDibbins thanks for the info! I'll try and add it now. thanks! The file should now be attached
    Attached Files Attached Files
    Last edited by neckty23; 02-08-2015 at 12:05 AM.

  6. #6
    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
    53,048

    Re: time and date formula

    ...IF...you will only ever have weeks or months, try this, copied down...
    =IF(ISNUMBER(SEARCH("month",B2,1)),EDATE(C2,LEFT(B2,2)),C2+(LEFT(B2,2)*7))

  7. #7
    Registered User
    Join Date
    02-07-2015
    Location
    usa
    MS-Off Ver
    2010 mac
    Posts
    6

    Re: time and date formula

    Awesome! works great. Thanks!

  8. #8
    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
    53,048

    Re: time and date formula

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. Replies: 6
    Last Post: 02-10-2014, 01:40 PM
  2. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  3. Replies: 2
    Last Post: 01-31-2013, 02:01 PM
  4. Replies: 0
    Last Post: 01-31-2013, 01:42 PM
  5. Formula for Calculating Paid Time Off for fiscal anniversary date real time
    By 168rockwood in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2012, 04:15 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