• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

when first column of formula is blank

Hi, in the attached column F should be a calculation of the remaining hours to make up a standard 8hr day or to remain blank until something is entered into the fields in columns C D or E.

My formula
appears to be working, except for when columns C and D are blank.

=IF(C3="","",SUM(8-C3,-D3,-E3))
 

Attachments

  • Chandoo when first column of formula is blank.xlsx
    16.7 KB · Views: 5
F3: either
=IF(LEFT([@Day],1)="S","",8-C3-D3-E3)
or
=IF(WEEKDAY([@Date],2)>5,"",8-C3-D3-E3)
 
or change the first part of the IF-statement
=IF(SUM(Table1[@[Regular Hours]:[Leave]])=0,"",SUM(8-C3,-D3,-E3))
 
If you are going to go with structured references, why not stick to it throughout?
= IF( SUM(Table1[@[Regular Hours]:[Leave]]),
8 - SUM(Table1[@[Regular Hours]:[Leave]]), "" )
 
Back
Top