Reputation: 11
I have a column with different types of notes: TBD, September, 9/25/2022, 9/25, etc.
I want to pull out in column B just the dates, and then in column C show the day of the week. Right now if the field in column B is blank, Column C defaults to Saturday with the formula =text(B2,"dddd")
Because of the variation of text in column A, I haven't been able to figure out which type of formula will work to just pull out the date and then leave blank if its not a date
Upvotes: 0
Views: 226
Reputation: 36880
Try below formulas
D2=INDEX(TEXT(A2:A,"mm/dd/e;;;"))
E2=INDEX(TEXT(A2:A,"dddd;;;"))
See you sheet D2
and E2
cell.
Upvotes: 0
Reputation: 2881
Paste this formula in B1
=ArrayFormula({"Date","Day of week";
TEXT(IF(ISNUMBER(A2:A),A2:A,""),"dd/mm/yyyy"),
text(IF(ISNUMBER(A2:A),A2:A,""),"dddd")
})
Upvotes: 1