Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nico
 
Posts: n/a
Default convert weekday string to number

Is there an easy way to convert a string which is either "Monday" thru
"Sunday" into a number to work with? In particular, I want to add a 1 if the
cell contains "Monday", 2 if "Tuesday" etc.

Any ideas?
Thanks!
  #3   Report Post  
CLR
 
Posts: n/a
Default

=LOOKUP(A1,{"Friday",5;"Monday",1;"Saturday",6;"Su nday",7;"Thursday",4;"Tues
day",2;"Wednesday",3})

Vaya con Dios,
Chuck, CABGx3


"nico" wrote in message
...
Is there an easy way to convert a string which is either "Monday" thru
"Sunday" into a number to work with? In particular, I want to add a 1 if

the
cell contains "Monday", 2 if "Tuesday" etc.

Any ideas?
Thanks!



  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

=MATCH(A1,{"Monday","Tuesday","Wednesday","Thursda y","Friday","Saturday","Su
nday"},0)

--
HTH

Bob Phillips

"nico" wrote in message
...
Is there an easy way to convert a string which is either "Monday" thru
"Sunday" into a number to work with? In particular, I want to add a 1 if

the
cell contains "Monday", 2 if "Tuesday" etc.

Any ideas?
Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to COnvert text string to number timtak Excel Discussion (Misc queries) 3 June 4th 05 04:57 AM
convert number to time format? JLHORMAN Excel Discussion (Misc queries) 1 May 26th 05 06:38 PM
Excell deletes 0 when its the first number in a string dustin1138 Excel Discussion (Misc queries) 2 May 7th 05 09:08 PM
how can i convert a number in words? HOP Excel Discussion (Misc queries) 1 November 27th 04 11:53 AM
count number of occurences within a string Gabriel Excel Worksheet Functions 2 November 25th 04 04:17 PM


All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"