+ Reply to Thread
Results 1 to 8 of 8

Dateif total

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Cambridgeshire
    MS-Off Ver
    Mac Excel 2011
    Posts
    4

    Smile Dateif total

    I am trying to add the results of DATEIF

    A1 1/1/12
    A2 1/2/12

    B4 =DATEDIF(A1,A2,"d")

    But when I enter the next date, I get error #NUM! I realize it's looking for the next date but need to add the sum of B4:B10

    Can anybody help. Can send excel spreadsheet if this helps.

    Kind regards

    Pedro

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Dateif total

    Hi Pedro,

    Welcome to the forum.


    But when I enter the next date
    where ? in which cell you entered date and got error ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    09-05-2012
    Location
    Cambridgeshire
    MS-Off Ver
    Mac Excel 2011
    Posts
    4

    Re: Dateif total

    Hi, Thank you for responding not sure if you got my last reply but please ignore this if you did.

    A1 1/1/12
    A2 1/2/12 B2 =A2-A1 (31) Drag B2 + to cells B3 to B5 and B3 will have -40940 and B4 and B5 (0)

    In B6 =sum(B2:B5) Answer -40940 not 31

    I realize that A3 is looking for the next date but will be relying on the person to enter the date in cells A1 to A? as many times as he likes depending on the input. Can email spreadsheet if it helps.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Dateif total

    If you do not want to reference in formula to change further, include $ sign before that ... $A$2-$A$1 = 31

    but I am still not getting your point ??

    do you want to subtract the latest date in column A (latest date i.e., whichever appears in bottom) from A1 cell always ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Dateif total

    Try using this formula

    =IF(COUNT(A1,A2)=2,A2-A1,"")
    Audere est facere

  6. #6
    Registered User
    Join Date
    09-05-2012
    Location
    Cambridgeshire
    MS-Off Ver
    Mac Excel 2011
    Posts
    4

    Re: Dateif total

    Sorry DILIPandey

    The spreadsheet is being designed for people who take warfarin (anticoagulants) to record their date and INR readings and the spreadsheet works out their Therapeutic Time Range. Their INR test is the date dd/mm/yyyy plus the INR which is number between 1 and 10

    Insert heading "Date" in A1 dd/mm/yyyy
    Insert heading "INR" in B1
    Insert heading "Start" in C2

    Now enter a date in A2 and a number between 1 and 10 into B2
    Now enter a date in A3 and a number in B2 and C3 will show "31"
    Now I want to copy cell C3 down into cells C4, C5,C6 etc by highlighting cell C3 and using the + sign on the bottom corner drag them down.
    Now C4 will show "-40940" and C5, C6 and C7 etc "0"
    I want to add up column C by =sum(C3:C?) but because of the error in C4 "-40940" I can't add that column up

    I have sent the spreadsheet, so it might help to understand the problem

    Sorry not easy to explain by writing the spreadsheet out!

    Kind regards

    Pedro

  7. #7
    Registered User
    Join Date
    09-05-2012
    Location
    Cambridgeshire
    MS-Off Ver
    Mac Excel 2011
    Posts
    4

    Re: Dateif total

    Hi daddylonglegs,

    Brilliant, go top of the class. No really well done excellent. Works a treat.

    Many thanks

    Pedro

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Dateif total

    @ Pedro999

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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