Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default adjust formula to much info

Hello how do I adjust the formula below so that when the answer is is less
than 1 year it only shows the number of months . example 10 months to read
read 10M not 0Y 10M and if over 1 year to show 1Y 10M
=DATEDIF(A1,A2,"y")&" Y "&DATEDIF(A1,A2,"ym")&" M"

As always, thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default adjust formula to much info

=IF(DATEDIF(A1,A2,"y")=0,"",DATEDIF(A1,A2,"y")&" Y ")&DATEDIF(A1,A2,"ym")&"
M"
--
David Biddulph

"Wanna Learn" wrote in message
...
Hello how do I adjust the formula below so that when the answer is is
less
than 1 year it only shows the number of months . example 10 months to
read
read 10M not 0Y 10M and if over 1 year to show 1Y 10M
=DATEDIF(A1,A2,"y")&" Y "&DATEDIF(A1,A2,"ym")&" M"

As always, thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula won't adjust after sorting data mmcap Excel Worksheet Functions 11 January 22nd 07 06:53 PM
creating formula to adjust per month Gibraltar13 Excel Discussion (Misc queries) 2 March 31st 06 06:10 PM
How do I adjust a formula a loan is displayed in a postive amount Lisa Excel Discussion (Misc queries) 0 February 20th 06 05:21 PM
how to adjust formula dependent on current month Ellen Excel Discussion (Misc queries) 2 September 2nd 05 07:20 PM
how do u copy a formula in over 100 cells and have it adjust kateyz Excel Worksheet Functions 1 June 21st 05 08:47 PM


All times are GMT +1. The time now is 05:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"