Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2018, 05:31 PM
Chayes Chayes is offline Have dates respect plurality... Windows XP Have dates respect plurality... Office 2003
Advanced Beginner
Have dates respect plurality...
 
Join Date: May 2012
Posts: 79
Chayes is on a distinguished road
Default Have dates respect plurality...

Hi All




I use this formula to give the time elapsed form the date showing in B6


Code:
="("&DATEDIF(B6,TODAY(),"y")&" years "&DATEDIF(B6,TODAY(),"ym")&" months "&DATEDIF(B6,TODAY(),"md")&" days"&")"
It works perfectly well , but has certain anomalies. For example it will make Days , Month and Years plural when there may only be one of each involved.


EG 1 Days , 1 Months , 1 Years


Can someone suggest a modification of the formula to give respect to single months , days and years?


EG 1 Day , 1 month , 1 Year


Grateful for any advice.
Reply With Quote
  #2  
Old 07-30-2018, 11:35 PM
xor xor is offline Have dates respect plurality... Windows 10 Have dates respect plurality... Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

="("&DATEDIF(B6,TODAY(),"y")&IF(DATEDIF(B6,TODAY() ,"y")=1," year ","years")&DATEDIF(B6,TODAY(),"ym")&IF(DATEDIF(B6, TODAY(),"ym")=1," month "," months ")&DATEDIF(B6,TODAY(),"md")&IF(DATEDIF(B6,TODAY(), "md")=1," day "," days"&")")
Reply With Quote
  #3  
Old 07-31-2018, 06:05 AM
Chayes Chayes is offline Have dates respect plurality... Windows XP Have dates respect plurality... Office 2003
Advanced Beginner
Have dates respect plurality...
 
Join Date: May 2012
Posts: 79
Chayes is on a distinguished road
Default

OK thanks for this. This resolves the issue first time.Much appreciated.




Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
X axis graph all dates when date column contains specific dates..possible ? DBenz Excel 2 03-28-2018 04:59 AM
Autofill dates - how can I get the same date and consecutive dates? Exhale Excel 3 04-05-2016 03:11 AM
Have dates respect plurality... Compare relative value with respect to specific column PRA007 Excel Programming 2 01-26-2016 06:11 AM
Extract data based on pattern with respect to specific column PRA007 Excel Programming 14 12-04-2015 04:32 AM
Have dates respect plurality... Changing Actual Finish dates changes original Finish dates SomewhereinTX Project 3 12-20-2013 10:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:37 AM.


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