Show nothing when no date is inputted

MWhiteDesigns

Well-known Member
Joined
Nov 17, 2010
Messages
646
Office Version
  1. 2016
Platform
  1. Windows
Good morning,
Earlier i received help with the below formula to automatically adjust a number according to the date. However if there is no projected date, it returns with an error. How do I adjust the code to just leave the cell blank when there's no date inputted yet?

his only works if 3 employees leave on the same day each month starting one month from today.

Excel 2007<table rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6" cellpadding="2.5px"><colgroup><col style="background-color: #E0E0F0" width="25px"><col><col><col><col></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th>
</th><th>A</th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr><td style="color: #161120;text-align: center;">1</td><td style=";">Employees on</td><td style="text-align: right;border-right: 1px solid black;;">4/27/2011</td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">160</td><td style="text-align: right;border-left: 1px solid black;;">
</td></tr><tr><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">
</td><td style="text-align: right;;">
</td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;;">
</td><td style="text-align: right;;">
</td></tr><tr><td style="color: #161120;text-align: center;">3</td><td style=";">Employees on</td><td style="text-align: right;border-right: 1px solid black;background-color: #EAF1DD;;">12/1/2012</td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">103</td><td style="text-align: right;border-left: 1px solid black;;">-35.63%</td></tr></tbody></table><table rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6" cellpadding="2.5px"><thead><tr style="background-color: #E0E0F0;text-align: center;color: #161120"><th>Sheet1</th></tr></thead></table>

Worksheet Formulas<table rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6" cellpadding="2.5px" width="100%"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th style=" background-color: #E0E0F0;color: #161120" width="10px">C3</th><td style="text-align:left">=C1-DATEDIF(B1,B3,"m")*3</td></tr><tr><th style=" background-color: #E0E0F0;color: #161120" width="10px">D3</th><td style="text-align:left">=-(C1-C3)/C1</td></tr></tbody></table>
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi,

You could try:

=If(iserror(C1-DATEDIF(B1,B3,"m")*3),"",C1-DATEDIF(B1,B3,"m")*3)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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