+ Reply to Thread
Results 1 to 4 of 4

Date Problem-See attached Excel Sheet

  1. #1
    Registered User
    Join Date
    11-15-2014
    Location
    Utah
    MS-Off Ver
    2007
    Posts
    6

    Date Problem-See attached Excel Sheet

    I'm having a problem with a date range giving the wrong solution. Open the spreadsheet for detail.

    Thanks in advance for any help. I'm using Excel 2007. I'm also a beginner.
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date Problem-See attached Excel Sheet

    DATEDIF($B$3,$B$4,"md") will always be 0 for both dates being first of month
    try
    =IF(EDATE($B$3,C7-1)>$B$4,0,$B$5)
    Last edited by martindwilson; 11-15-2014 at 08:27 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-15-2014
    Location
    Utah
    MS-Off Ver
    2007
    Posts
    6

    Re: Date Problem-See attached Excel Sheet

    Thanks for you help. I'm new enough to Excel that I may not of understood your suggestion. This is what I did:

    I removed: =IF(C7<=DATEDIF($B$3,$B$4,"M")+(DATEDIF($B$3,$B$4,"md")>0),$B$5,0)

    and replaced all of it with =IF(EDATE($B$3,C7-1)>$B$4,0,$B$5).


    This worked by giving the correct number of months, 12, but when I changed the begin date from 1/1/2015 to 1/2/2015 it returned to the incorrect number 11.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date Problem-See attached Excel Sheet

    well there are only 11 months between those 2 dates

+ 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: 0
    Last Post: 11-28-2013, 06:06 AM
  2. Replies: 5
    Last Post: 11-09-2012, 11:08 AM
  3. Convert multiple column to excel sheet attached
    By ahad_bwp in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 09:04 AM
  4. Replies: 3
    Last Post: 11-02-2011, 10:01 AM
  5. Recording date Excel file is attached to e-mail?
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2006, 02:15 PM

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