Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

Hi, I am using the dated if function and it works for most values but not all even though the formulas and formats are all the same - can you help?
Solved by V. J. in 37 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 14/12/2017 - 02:43
Hello, Welcome to Got It pro
User 14/12/2017 - 02:43
Hi
Excelchat Expert 14/12/2017 - 02:44
How may I help you?
User 14/12/2017 - 02:44
So, I am using a datedif function to return the number of months
Excelchat Expert 14/12/2017 - 02:45
ok
Excelchat Expert 14/12/2017 - 02:45
Please paste your data here
User 14/12/2017 - 02:45
one sec let me do now
User 14/12/2017 - 02:46
sorry excel has crashed - let me open and upload file
Excelchat Expert 14/12/2017 - 02:46
Ok
User 14/12/2017 - 02:47
Sorry taking a while to open - please bear with me
Excelchat Expert 14/12/2017 - 02:48
No problem Sir
User 14/12/2017 - 02:49
It's not opening - I will type it out
Excelchat Expert 14/12/2017 - 02:49
Ok
User 14/12/2017 - 02:52
Why does the cell highlighted not return 7?
Excelchat Expert 14/12/2017 - 02:55
you want to find difference in month
Excelchat Expert 14/12/2017 - 02:55
right?
User 14/12/2017 - 02:55
Yes
Excelchat Expert 14/12/2017 - 02:55
ignoring years?
User 14/12/2017 - 02:55
yes
Excelchat Expert 14/12/2017 - 02:55
and days?
User 14/12/2017 - 02:55
no just months
User 14/12/2017 - 02:56
yes ignoring days and years
Excelchat Expert 14/12/2017 - 02:56
ok
User 14/12/2017 - 02:56
I'm confused as it works on all my other dates
Excelchat Expert 14/12/2017 - 02:57
o
Excelchat Expert 14/12/2017 - 02:57
Please wait
User 14/12/2017 - 02:57
sorry
Excelchat Expert 14/12/2017 - 03:03
See cell H7
Excelchat Expert 14/12/2017 - 03:03
there I am getting right result
Excelchat Expert 14/12/2017 - 03:04
But, in C11, It's not coming
Excelchat Expert 14/12/2017 - 03:04
data is same for both
User 14/12/2017 - 03:04
But should be 7
User 14/12/2017 - 03:05
if including nov
Excelchat Expert 14/12/2017 - 03:05
Yes
Excelchat Expert 14/12/2017 - 03:05
but the formula doesn't include it
Excelchat Expert 14/12/2017 - 03:05
As per formula, it is : 11-6 = 5
Excelchat Expert 14/12/2017 - 03:05
So, if I add 1 , then it will be 6
User 14/12/2017 - 03:06
I need the number of month between Nov17-Jun18 which is 7 months
Excelchat Expert 14/12/2017 - 03:06
No, that's not true
User 14/12/2017 - 03:07
6 is not correct either
Excelchat Expert 14/12/2017 - 03:07
if you include both the months
User 14/12/2017 - 03:07
sorry 8
Excelchat Expert 14/12/2017 - 03:07
then also, it will be 6 at max
Excelchat Expert 14/12/2017 - 03:07
June, july, aug, Sept, Oct., Nov.
Excelchat Expert 14/12/2017 - 03:07
which is = 1+1+1+1+1+1 = 6
User 14/12/2017 - 03:07
Nov, dec 17, Jan, Feb, mAr, apr, may,jun
User 14/12/2017 - 03:08
nov dec 17 and the rest in 2018
Excelchat Expert 14/12/2017 - 03:08
ok got it
Excelchat Expert 14/12/2017 - 03:08
the other way
Excelchat Expert 14/12/2017 - 03:08
then 8 is correct
Excelchat Expert 14/12/2017 - 03:08
if you add 1
Excelchat Expert 14/12/2017 - 03:09
because formula by default includes one of the end months
User 14/12/2017 - 03:09
The number in cell B11 should then be 9?
User 14/12/2017 - 03:10
I'm confused as the dates in B10 and C10 are a month apart but return the same number of months
User 14/12/2017 - 03:10
I would expect the number of months to change by 1 given that we are on the next month
Excelchat Expert 14/12/2017 - 03:11
Ohh, this has something to do with end dates of month
Excelchat Expert 14/12/2017 - 03:12
each date is either 30 or 31st
User 14/12/2017 - 03:12
or 28th in the case of Feb
Excelchat Expert 14/12/2017 - 03:12
yes
User 14/12/2017 - 03:12
0r 29th
Excelchat Expert 14/12/2017 - 03:13
My suggestion is that, just use month() function
User 14/12/2017 - 03:14
Ok...
Excelchat Expert 14/12/2017 - 03:15
Anything else, I may help you with?
User 14/12/2017 - 03:15
how does that work?
Excelchat Expert 14/12/2017 - 03:17
Please see row 12
User 14/12/2017 - 03:18
ok thank you
Excelchat Expert 14/12/2017 - 03:18
Welcome :)
Excelchat Expert 14/12/2017 - 03:18
Thanks for your patience!
Excelchat Expert 14/12/2017 - 03:18
Have a great day :)
Excelchat Expert 14/12/2017 - 03:18
Please leave your valuable feedback :)
Excelchat Expert 14/12/2017 - 03:19
You may close the session now from above button

This is the output file from the real Excelchat help session:
This is an example of the expert help you can get. It contains no private user information.

Get instant expert help with Excel and Google Sheets

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.

Click here to get your free Excelchat help session

Subscribe to Excelchat.co
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc