Saturday, August 21, 2021

Days of Week or Month Number in Excel / Google Sheets

Here are some easy ways to convert dates into the day of the week (Mon, Tue, etc.)

=HLOOKUP(WEEKDAY(A1),{1,2,3,4,5,6,7;"Sun","Mon","Tue","Wed","Thu","Fri","Sat"},2,FALSE)

=TEXT(A1,"dddd")

Here's how to convert Month names to numbers

=HLOOKUP(A2,{"January","February","March","April","May","June","July","August","September","October","November","December";1,2,3,4,5,6,7,8,9,10,11,12},2,FALSE)

Custom Formula for Conditional Formatting to Highlight Duplicate Values in Google Sheets

=countif($A$1:$A$1000,A1)>1