Solved

Lokking for an Excel "Day" type function.

Posted on 2011-02-16
3
398 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

861 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