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.
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.
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
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.
well there are only 11 months between those 2 dates
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks