Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

Months extract from formula

Experts:

I need to modify this formula to return Months instead of the number of days.  
How can I do this?

=IF(GTExpireDate<FacilityExpirationDate,SUM(MID($D$15,SEARCH({"mon","day"},$D$15)-3,2)*{30,1}),"Expires After Facility Expiration")

ie it returns "60" for the number of days but I need it to return 2 months.

thank you
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pdvsa

ASKER

it might be better to look at the file.

What I need is the remainder in months on row 36.  

should be 2.  

thank you
LC-Costs.xls
Did you try the formula I gave? That should give the result 2 - it just extracts the month figure from D15. What result would you want if the value in D15 was 4 years 2 months 20 days?

tbarkdull's suggestion will give you a fraction, e.g. 2.67, mine will still give you 2 - what should it be, either of those or something else?

regards, barry
Avatar of pdvsa

ASKER

I am not sure which one at the moment.  Sorry got a little sidetracked with new job.  

thank you for the help.