Reputation: 2771
In one of the excel cell is the date (say 01.11.2013). I have formated this cell as DDDD so it is displayed as day (for this date it is Friday).
Now I am not able to compare the contents of the cell (actually being displayed as Friday) with string "Friday".
Is it possible? I have used Value(Text) formula and Exact(text, text) formula but it does not helps.
Thanks in advance.
Upvotes: 0
Views: 70
Reputation: 46341
TEXT function varies by region - you need to use the equivalent of "dddd" for your region....or use WEEKDAY function which doesn't vary
=IF(WEEKDAY(A1)=6,"yes","no")
WEEKDAY returns 1 for Sunday through to 7 for Saturday
Upvotes: 2
Reputation: 493
Use TEXT function to compare. For example:
=IF(TEXT(A1,"DDDD")="Friday","Equal","Not")
to compare cell A1 with "Friday"
Upvotes: 3