How to use the IsBlank Function with the DAYS function - Excel 365

%3CLINGO-SUB%20id%3D%22lingo-sub-2394823%22%20slang%3D%22en-US%22%3EHow%20to%20use%20the%20IsBlank%20Function%20with%20the%20DAYS%20function%20-%20Excel%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2394823%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20just%20running%20a%20simple%20spreadsheet%20for%20collating%20my%20energy%20usage%20-%20see%20really%20simple!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20just%20cannot%20get%20rid%20of%20the%200s%20and%20the%20date%20reference%20when%20one%20of%20the%20dates%20is%20blank%2C%20re%20attached%20excerpts...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20use%20this%20forumula%2C%20but%20it's%20not%20working%3B%20so%20can%20anyone%20help%20me%20please%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22%3DIF(OR(ISBLANK(A19)%2CISBLANK(A18))%2C%22%22%2C(DAYS(A19%2CA18)%2C0)%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2394823%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2395039%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20the%20IsBlank%20Function%20with%20the%20DAYS%20function%20-%20Excel%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2395039%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1065550%22%20target%3D%22_blank%22%3E%40MaggieMoonlight%3C%2FA%3E%20There%20is%20a%20superfluous%20parenthesis.%3C%2FP%3E%0A%3CP%3ETry%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(OR(ISBLANK(A19)%2CISBLANK(A18))%2C%22%22%2CDAYS(A19%2CA18)%2C0)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20A18%20and%2For%20A19%20contain%20formulas%2C%20it's%20better%20to%20use%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(OR(A19%3D%22%22%2CA18%3D%22%22)%2C%22%22%2CDAYS(A19%2CA18)%2C0)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi,

 

I am just running a simple spreadsheet for collating my energy usage - see really simple!

 

 

But I just cannot get rid of the 0s and the date reference when one of the dates is blank, re attached excerpts...

 

 

I am trying to use this forumula, but it's not working; so can anyone help me please?

 

 

"=IF(OR(ISBLANK(A19),ISBLANK(A18)),"",(DAYS(A19,A18),0)"

 

 

Thank you.

2 Replies

@MaggieMoonlight There is a superfluous parenthesis.

Try

 

=IF(OR(ISBLANK(A19),ISBLANK(A18)),"",DAYS(A19,A18),0)

 

If A18 and/or A19 contain formulas, it's better to use

 

=IF(OR(A19="",A18=""),"",DAYS(A19,A18),0)