[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Months extract from formula

Posted on 2011-09-14
5
Medium Priority
?
264 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:pdvsa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 1000 total points
ID: 36536790
If you want to ignore the days and just take months try this version

=IF(GTExpireDate<FacilityExpirationDate,MID($D$15,SEARCH("mon",$D$15)-3,2)+0,"Expires After Facility Expiration")

regards, barry
0
 
LVL 10

Assisted Solution

by:Tony Barkdull
Tony Barkdull earned 1000 total points
ID: 36536792
Just divide by 30...

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

0
 

Author Comment

by:pdvsa
ID: 36536901
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
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36537037
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
0
 

Author Closing Comment

by:pdvsa
ID: 36538107
I am not sure which one at the moment.  Sorry got a little sidetracked with new job.  

thank you for the help.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question