Users enter two dates. The formula needs to determine the number of months beginning with the first date and ending with the second. 5 months or less should return a "S". Greater than 5 months should return a "L".
<tbody>
</tbody>
C1 Formula:
=IF((YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)>=5,"L",IF((B1)-(A1)>=1,"S","0"))
The problem is the above dates represent 5 months so it should result in a S, but it's showing a L.
Start Date (A1) | End Date (B1) | S or L (C1) |
10/09/2013 | 03/08/2014 | L |
<tbody>
</tbody>
C1 Formula:
=IF((YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)>=5,"L",IF((B1)-(A1)>=1,"S","0"))
The problem is the above dates represent 5 months so it should result in a S, but it's showing a L.
Last edited: