+ Reply to Thread
Results 1 to 5 of 5

Adding days giving wrong result

Hybrid View

  1. #1
    Registered User
    Join Date
    11-29-2020
    Location
    india
    MS-Off Ver
    2021
    Posts
    92

    Adding days giving wrong result

    i have number of days in decimal format in column A, i m trying to add it to the datetime of column B to get new date time in column C but simpling adding the decimal to the B value & using different method by converting the decimal to days hrs min seconds n then adding it to B vale to get new date 2...but instead of same result in both column i get different results....m attaching the excel file...plz guide
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,240

    Re: Adding days giving wrong result

    Which version of Excel are you using? Your profile says 2000.

    Which column shows the results you are expecting?
    Last edited by AliGW; 05-29-2023 at 07:52 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-29-2020
    Location
    india
    MS-Off Ver
    2021
    Posts
    92

    Re: Adding days giving wrong result

    column c & d show the new dates using the 2 method

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

    Re: Adding days giving wrong result

    try

    in D2

    Formula: copy to clipboard
    =DATE(YEAR(B2),MONTH(B2),DAY(B2)+E2)+TIME(HOUR(B2)+G2,MINUTE(B2)+I2,SECOND(B2)+K2)+IF(HOUR(B2)+G2>24,1)
    Last edited by JohnTopley; 05-29-2023 at 01:33 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,240

    Re: Adding days giving wrong result

    Quote Originally Posted by littleangel View Post
    column c & d show the new dates using the 2 method
    I asked what the new date should be - which, if either, of the two is what you want and why?

+ 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. [SOLVED] Random Time macro giving wrong result
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2021, 04:24 AM
  2. [SOLVED] if formula is giving us wrong result
    By Ajay45822 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-12-2021, 12:55 PM
  3. [SOLVED] OFFSET function is giving the wrong result in some cells.
    By polichara in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-26-2020, 06:15 PM
  4. [SOLVED] Formular giving wrong result
    By st_judeu@yahoo.com in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-18-2020, 04:42 AM
  5. Macro giving wrong result for counting rows
    By aniletc37 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-11-2014, 07:57 AM
  6. formula giving wrong result sometimes?
    By lnjr in forum Excel General
    Replies: 2
    Last Post: 08-13-2010, 09:20 AM
  7. IF function giving wrong result
    By dzorug in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-23-2005, 11:41 AM

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