Solved

Lokking for an Excel "Day" type function.

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now