day formula in a if statement -


i using formula below check see if january first on saturday. calendar i've created flip years using macro in place, january first may not lay on saturday. reason need use day because cell refering in day format.

=if(day(h5)=1,"winter","") formula

january 1st days of week

2018- monday calendar

2019- tuesday

2023- saturday etc...

so h5 place of first saturday in january,

if h5 = january 1st should show "winter" if not should return blank. issue formula getting caught on day(h5)=1. returns #value instead of blank. there work around can use show blanks instead?

i have conditional formatting in place cell grayed out (font colour , fill). looks when it's in spreadsheet once it printed still show #value.

thanks in advance,

wrap formula in iferror():

=iferror(if(day(h5)=1,"winter",""),"") 

or can test ensure h5 has value:

=if(h5<>"",if(day(h5)=1,"winter",""),"") 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -