+ Reply to Thread
Results 1 to 4 of 4

formula/macro. How to convert data (weekday, week number, year) to a date?

  1. #1
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    formula/macro. How to convert data (weekday, week number, year) to a date?

    Hi all
    I need bit help as all my own attempts to find/create a solution have been unfruitful.

    I have data in three columns (col A,B,C - weekday, week number and year). Can anyone help me to figure out a formula or macro solution to convert all this into a date (in UK format - dd/mm/yyyy). Please see example below:

    Before

    Col A ----------- Col B -------- Col C
    Tuesday --------- 43 --------- 2011
    Monday ---------- 44 --------- 2011
    Tuesday --------- 44 --------- 2011
    Wednesday ---- 44 --------- 2011
    Monday ---------- 45 --------- 2011
    Tuesday --------- 45 --------- 2011
    Tuesday --------- 45 --------- 2011
    Wednesday ---- 45 --------- 2011
    Thursday -------- 45 --------- 2011



    After

    Col A ----------- Col B -------- Col C --------- Col D
    Tuesday --------- 43 --------- 2011 --------- 25/10/2011
    Monday ---------- 44 --------- 2011 --------- 31/10/2011
    Tuesday --------- 44 --------- 2011 --------- 01/11/2011
    Wednesday ---- 44 --------- 2011 --------- 02/11/2011
    Monday ---------- 45 --------- 2011 --------- 07/11/2011
    Tuesday --------- 45 --------- 2011 --------- 08/11/2011
    Tuesday --------- 45 --------- 2011 --------- 08/11/2011
    Wednesday ---- 45 --------- 2011 --------- 09/11/2011
    Thursday -------- 45 --------- 2011 --------- 10/11/2011



    I have attached a spreadsheet with this very same example. Any help is greatly appreciated.
    Cheers
    Attached Files Attached Files
    Last edited by rain4u; 11-19-2011 at 10:35 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: formula/macro. How to convert data (weekday, week number, year) to a date?

    Are you using ISO week numbering?

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: formula/macro. How to convert data (weekday, week number, year) to a date?

    For ISO week numbers try this formula in D1 copied down

    =DATE(C1,1,-3)-WEEKDAY(DATE(C1,1,3))+B1*7+MATCH(A1,INDEX(TEXT(ROW(INDIRECT("2:8")),"dddd"),0),0)
    Audere est facere

  4. #4
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: formula/macro. How to convert data (weekday, week number, year) to a date?

    Thank you guys.

    daddylonglegs, works like a charm.

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1