+ Reply to Thread
Results 1 to 10 of 10

Need help with formula that adds two numbers to a date

  1. #1
    Registered User
    Join Date
    07-31-2017
    Location
    delhi
    MS-Off Ver
    2013
    Posts
    5

    Need help with formula that adds two numbers to a date

    Hii all . I need help in the formula in attached images. I want to put a formula that will calculate and show me two dates within one cell. Say for eg I have to revise a subject after either 7 or 8 days and I want to make a formula that returns a date after adding 7 and 8 and displays these two values within the same cell. I tried the formula as in Image1 attached herewith
    Image1.png.

    While it works perfectly for cell D3 and D4, the same formula gives a Value! error on applying in other column
    Image2.png.

    Kindly help me out.
    Thanks
    Attached Files Attached Files
    Last edited by VatsalB; 07-31-2017 at 03:07 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,673

    Re: Need help with formula

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    07-31-2017
    Location
    delhi
    MS-Off Ver
    2013
    Posts
    5

    Re: Need help with formula that adds two numbers to a date

    I have uploaded the workbook.

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

    Re: Need help with formula that adds two numbers to a date

    The workbook does not correspond to the pictures so we don't know why those two dates are different formats. Are they dates or strings?
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    07-31-2017
    Location
    delhi
    MS-Off Ver
    2013
    Posts
    5

    Re: Need help with formula that adds two numbers to a date

    Sorry was a previous saved worbook I uploaded by mistake.
    The cell D2 and E2 are in date formats.

  6. #6
    Registered User
    Join Date
    07-31-2017
    Location
    delhi
    MS-Off Ver
    2013
    Posts
    5

    Re: Need help with formula that adds two numbers to a date

    Thanks protonLeah. I figured out the mistake. The formats of cell was indeed different and hence the formula wasn't working. Thanks

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

    Re: Need help with formula that adds two numbers to a date

    Try

    =TEXT(D2+7,"d/m/yy") & " to " & TEXT(D2+8,"d/m/yy")

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,673

    Re: Need help with formula that adds two numbers to a date

    Try

    =TEXT(E2+7,"d/m/yy")&" to "&TEXT(E2+8,"d/m/yy")

  9. #9
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Need help with formula that adds two numbers to a date

    =TEXT(E2+7&DAY(E2),"d/m/yy")&" to "&TEXT(E2+8&DAY(E2),"d/m/yy")

    the highlight red is create the error and it seem like need not to put in.

    it work for D2 is due to their have the time behind (hour and minute), excel will read hour and minute as decimal point,
    the &Day(E2) is add in behind the decimal (eg, 1.00 > 1.0010) , hence it not affect much in the formula, the date still within the same date,

    But E2 is have not time value behind the date, excel read as not decimal point behind.
    the &Day(E2) is add in behind the whole value (eg 1 > 110),
    hence the effect is so significant, as it might over the limit of the calender and cause #Value!.

    you would more clear when you go to
    Formula (Ribbon) > Formula Auditing (section) > Evaluate formula > Evaluate
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

  10. #10
    Registered User
    Join Date
    07-31-2017
    Location
    delhi
    MS-Off Ver
    2013
    Posts
    5

    Re: Need help with formula that adds two numbers to a date

    thanks..it worked

+ 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. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  2. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  3. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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