Home > database >  If date field is blank return blank but if it has a date return the day in week
If date field is blank return blank but if it has a date return the day in week

Time:05-14

I have am using this formula which returns the correct day of the week based on date in cells A2:A

=ArrayFormula(switch(WEEKDAY(A3),"","",1,"Sunday",2,"Monday",3,"Tuesday",4,"Wednesday",5, "Thursday",6,"Friday",7,"Saturday"))

I also need it to include if cell A3 is blank "" then return blank "".

I thought this part ,"","" would do as I require, however it simply returns the exact same result had I not included this part!

how can I include the isblank formula here?

An example sheet is here: https://docs.google.com/spreadsheets/d/15_PYwwUR6K9s3Jl6eEoH06E_S_8H21HZJFbkqP-HPVY/edit?usp=sharing

CodePudding user response:

Solved it :)

=IF(P3="","",(switch(WEEKDAY(P3),1,"Sunday",2,"Monday",3,"Tuesday",4,"Wednesday",5, "Thursday",6,"Friday",7,"Saturday")))
  •  Tags:  
  • date
  • Related