How to hide 0 value

shah_ir85

New Member
Joined
May 8, 2016
Messages
40
Hello, i have one simple question

How to hide 0 value for Year or Month?
StartFinishDuration
1 Dec 1920 Dec 201 Year 0 Month 19 Day
=DATEDIF(RX232,RZ232,"Y")&" Year "&DATEDIF(RX232,RZ232,"YM")&" Month " &DATEDIF(RX232,RZ232,"MD")&" Day"

tQ in advanced
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Book1
RXRZSA
231StartFinishDuration
2321-Dec-1920-Dec-201 Year 0 Month 19 Day
2331 Year Month 19 Day
Sheet2
Cell Formulas
RangeFormula
SA233SA233=SUBSTITUTE(DATEDIF(RX232,RZ232,"Y")&" Year "&DATEDIF(RX232,RZ232,"YM")&" Month "&DATEDIF(RX232,RZ232,"MD")&" Day","0 "," ")
 
Last edited:
Upvote 0
Option
Book1
RXRYRZSA
231StartFinishDuration
2321-Dec-1920-Dec-201 Year 19 Day
Sheet2
Cell Formulas
RangeFormula
SA232SA232=TRIM(IF(DATEDIF(RX232,RZ232,"Y")<>0,DATEDIF(RX232,RZ232,"Y")&" Year "," ")&IF(DATEDIF(RX232,RZ232,"YM")<>0,DATEDIF(RX232,RZ232,"YM")&" Month "," ")&IF(DATEDIF(RX232,RZ232,"MD")<>0,DATEDIF(RX232,RZ232,"MD")&" Day"," "))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top