Thread: [Solved] Date Calculation
View Single Post
 
Old 04-18-2012, 12:11 AM
caholmes caholmes is offline Windows Vista Office 2007
Advanced Beginner
 
Join Date: Dec 2008
Location: Sydney, Australia
Posts: 54
caholmes is on a distinguished road
Default

Hi Lights,

I'm not a big fan of adding text to the formula result because it stops you using that answer in another formula. I would possibly use the following formula:

=(MONTH(TODAY())+YEAR(TODAY())*12)-(MONTH(A1)+YEAR(A1)*12)

This will give you an integer (whole number) as a result. After that I would use a custom format to add the text that you want into the same cell as the formula.



After you enter the formula:
  1. go into format cells (Ctrl + 1)
  2. select the number tab
  3. choose custom (bottom of the list)
  4. in the type box, type: 0" mos"
  5. click OK
This will display at least 1 number and add " mos" after it and it won't break any formulas.
Reply With Quote