#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default format dates enigma

Hello I receive a monthly report that has dates that I need deciphered.
Column title is "week ending" the date is 08-10-26 , this means week
ending October 26 2008 . the next colum is "Day" and it has a 1 .(could be
any number from 1 to 5 . 1 being Monday, 2 = Tuesday 3 = Wednesday .
SO 08-10-26 1 = Mon 10/20/08 .
Is there a formula to do this. thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default format dates enigma

You r ending data is always Sunday. therefore if you subtract 7 from the end
data and then add your day number 1 to 5 you will get the date you are
looking form

for October 26th

You start with October 19th and then add 1 to 5

so the formula is

=D5-7+E5 where D5 is October 26th , and E5 is the number 1 to 5

Make sure the cell where the formula is located is formated in any Date
format.

"Wanna Learn" wrote:

Hello I receive a monthly report that has dates that I need deciphered.
Column title is "week ending" the date is 08-10-26 , this means week
ending October 26 2008 . the next colum is "Day" and it has a 1 .(could be
any number from 1 to 5 . 1 being Monday, 2 = Tuesday 3 = Wednesday .
SO 08-10-26 1 = Mon 10/20/08 .
Is there a formula to do this. thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default format dates enigma

On Thu, 6 Nov 2008 04:04:00 -0800, Wanna Learn
wrote:

Hello I receive a monthly report that has dates that I need deciphered.
Column title is "week ending" the date is 08-10-26 , this means week
ending October 26 2008 . the next colum is "Day" and it has a 1 .(could be
any number from 1 to 5 . 1 being Monday, 2 = Tuesday 3 = Wednesday .
SO 08-10-26 1 = Mon 10/20/08 .
Is there a formula to do this. thanks in advance


The formula will depend critically on the nature of the entry in the Week
Ending column.

If the entry is a true Excel date, that is formatted to appear as above
("yy-mm-dd"), then the formula would be:

=Week_Ending-WEEKDAY(Week_Ending-1-Day)

If the entry is a text string, and not a true date, then it needs to be
converted to a true date with this formula:

=DATE(LEFT(A2,2)+2000,MID(A2,4,2),RIGHT(A2,2))

Substituting:

=DATE(LEFT(A2,2)+2000,MID(A2,4,2),RIGHT(A2,2)) -
WEEKDAY(DATE(LEFT(A2,2)+2000,MID(A2,4,2),RIGHT(A2, 2))
-1-Day
--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default format dates enigma

On Thu, 06 Nov 2008 07:30:54 -0500, Ron Rosenfeld
wrote:

=Week_Ending-WEEKDAY(Week_Ending-1-Day)


Joel's solution is simpler. But, depending on whether your week ending date is
a string or a true Excel date, you may still have to translate it as I
previously wrote.

But using Joel's simpler approach, that would be:

=DATE(LEFT(A2,2)+2000,MID(A2,4,2),RIGHT(A2,2)) - 7 + Days
--ron
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
CONVERT DATES FROM EUROPEAN FORMAT TO US FORMAT les8 New Users to Excel 8 August 8th 06 05:48 PM
Format text 'dates' to real dates Jacy Excel Worksheet Functions 4 July 24th 06 02:10 AM
Format dates steven Excel Discussion (Misc queries) 4 January 19th 06 12:44 PM
keeping dates in UK format jarvo Excel Discussion (Misc queries) 7 August 17th 05 04:03 PM
the dates on cell format make different dates. date formats morph the dates/chang case New Users to Excel 6 April 18th 05 02:41 AM


All times are GMT +1. The time now is 04:51 AM.

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

About Us

"It's about Microsoft Excel"