Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2011, 04:38 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default help with formulate refers to values


Guys, Good day.

I have a question regarding a formulate. I need to know how many months are left in a contract, for example:
I have the start date (1/11/2011) and termination of a contract (31/12/2011) and based on what we are (26/01/2011) want to know how many months left to end the contract.

I figured it would be like = SUM (contract expires) - (date (today)) or = MONTH (Today) - CONTRACT TERMINATION

Could someone explain to me how it works?

Thanks
Reply With Quote
  #2  
Old 01-26-2011, 05:21 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline help with formulate refers to values Windows 7 32bit help with formulate refers to values Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

The formula will be very similar to the excellent answer ConneXionLost gave you on this thread:
https://www.msofficeforums.com/excel...el-2010-a.html

The only extra piece you need is how to return today's date. You can do this using the TODAY() function.

Does that help?
Reply With Quote
  #3  
Old 01-26-2011, 05:45 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default

It would be like this:

DATEDIF = (TODAY (), 'end date)

?
Reply With Quote
  #4  
Old 01-26-2011, 06:01 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline help with formulate refers to values Windows 7 32bit help with formulate refers to values Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Almost. Please see attached example, based on the spreadsheet that was attached on the other thread.

Code:
=IF(B2>C2,
    DATEDIF(C2,B2,"m")&" months "&DATEDIF(C2,B2,"md")&" days",
    "0 days")
Attached Files
File Type: xls UsingDATEDIF.xls (13.5 KB, 16 views)
Reply With Quote
  #5  
Old 01-26-2011, 06:10 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default

Okay, I do not have the option today in my spreadsheet, where the choice today should be on the same formulate. Is it possible?

In Open Office works as follows:

= MONTH (TODAY ();$' END DATE '. $ G $ 7, 0) and that the G7 is where is located the end date. This way the update is automatic and I do not need a field today () on a new cell.
Reply With Quote
  #6  
Old 01-26-2011, 06:15 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline help with formulate refers to values Windows 7 32bit help with formulate refers to values Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

Sure, you can - just replace C2 in the formula with TODAY()
Code:
=IF(B2>TODAY(),
    DATEDIF(TODAY(),B2,"m")&" months "&DATEDIF(TODAY() ,B2,"md")&" days",
    "0 days")
However, I would recommend that you spare one cell in your worksheet for the TODAY() function and reference it from the formulas because:
1. This will give you more flexibility. For example, if you quickly wanted to see time remaining on contracts for a date other than today, you could quickly change the value in that one cell to see the results.
2. TODAY() is a volatile function. It is more efficient to structure the sheet this way.

Hope that helps...
Reply With Quote
  #7  
Old 01-26-2011, 06:16 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default

Resolved:
DATEDIF = (TODAY () DATE END; "M")

Thanks for help
Reply With Quote
  #8  
Old 01-26-2011, 06:25 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default

I forgot one point if today's date is later than the end date. How to make up the negative?
Reply With Quote
  #9  
Old 01-26-2011, 06:36 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline help with formulate refers to values Windows 7 32bit help with formulate refers to values Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

DATEDIF() can't handle an end date earlier than the start date, so I think you would have to arrange the formula like this:
Code:
=IF(B2<TODAY(),"- ","")&
    DATEDIF(MIN(B2,TODAY()),MAX(B2,TODAY()),"m")&" months "&
    DATEDIF(MIN(B2,TODAY()),MAX(B2,TODAY()),"md")&" days"
Reply With Quote
  #10  
Old 01-26-2011, 08:43 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default

Good Afternoon,

Could be made available in a form in excel? I tried to assemble the formulate but unsuccessfully.
Reply With Quote
  #11  
Old 01-26-2011, 09:47 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline help with formulate refers to values Windows 7 32bit help with formulate refers to values Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Sure, please see attached.
Attached Files
File Type: xls UsingDATEDIF.xls (13.5 KB, 11 views)
Reply With Quote
  #12  
Old 01-26-2011, 10:00 AM
meninio's Avatar
meninio meninio is offline help with formulate refers to values Windows XP help with formulate refers to values Office 2010 32bit
Novice
help with formulate refers to values
 
Join Date: Jan 2011
Location: Brasil
Posts: 15
meninio is on a distinguished road
Default

Colin Legg,

Thanks for help!
Problem is resolved.

Last edited by meninio; 01-26-2011 at 10:01 AM. Reason: completed information
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
help with formulate refers to values Formulate month in Excel 2010 meninio Excel 4 01-25-2011 12:13 PM
Drag Button which refers to the active Word document to Explorer DRob Word 0 10-03-2010 06:40 AM
help with formulate refers to values Using Conditions to Add Values EclipticalD Excel 1 07-08-2010 09:50 PM
Opening .pst with dummy values ran_sushmi Outlook 0 08-19-2009 01:56 AM
Fields controlled by List box values farfromapro Word 0 02-11-2009 02:19 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft