Solved

Lokking for an Excel "Day" type function.

Posted on 2011-02-16
3
396 Views
Last Modified: 2012-06-21
Hi everyone....

Does anyone know of a sort of inverse of the WEEKDAY function in Excel 2003?
If I know the day "text", I'd like to use a built-in function to change "Sun"  to 2, "Thu" to 4 etc.
I know I could use =IF(A1="Sun",1,If(A1="Mon",2,........))))))). I just wondered if anyone knew of a ready made function I could enter into the cell of a Spreadsheet (NOT a VB function).
0
Comment
Question by:sts023
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 34908153
No really simply way but try

=MATCH(A1,{"Sun","Mon","Tue","Wed","Thu","Fri","Sat"},0)

or

=MATCH(A1,TEXT({1,2,3,4,5,6,7},"ddd"),0)

regards, barry
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 250 total points
ID: 34908255
...if you want it to work with either Sun or Sunday in A1 change to

=MATCH(LEFT(A1,3),TEXT({1,2,3,4,5,6,7},"ddd"),0)

regards, barry

0
 

Author Comment

by:sts023
ID: 34910485
Thanks Barry - that's one up for experience (or at least, lateral thinking!).
Steve.
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question