Show Blank Instead Of "0"

RandyD123

Active Member
Joined
Dec 4, 2013
Messages
289
Office Version
  1. 2016
Platform
  1. Windows
If I have nothing in my E or F column, the cells in G show a "0", where the formula below is. How can I correct this so the cells in G show blank if nothing is in E or F?

=(TEXT(F4,"00\:00")-TEXT(E4,"00\:00"))*24


The same thing with the formula below. D2 is a static number (20%). If I have nothing in some of the cells in the C column, how can I get the result in D to be blank instead of showing "0"?

=SUM(C4 * 6.5)*($D$2)

Thanks for any help.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
try
=if(CELL=0,"",SUM(C4 * 6.5)*($D$2))
similar for the other
 
Upvote 0
How about
Excel Formula:
=IF(AND(E4="",F4=""),"",(TEXT(F4,"00\:00")-TEXT(E4,"00\:00"))*24)
and
Excel Formula:
=IF(C4="","",C4*6.5*$D$2)
 
Upvote 0
Solution
Cell is the cell address as shown on post #3

or you can do this

 
Upvote 0
How about
Excel Formula:
=IF(AND(E4="",F4=""),"",(TEXT(F4,"00\:00")-TEXT(E4,"00\:00"))*24)
and
Excel Formula:
=IF(C4="","",C4*6.5*$D$2)
Yes, both work perfectly. Thank You!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,267
Members
448,558
Latest member
aivin

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