+ Reply to Thread
Results 1 to 8 of 8

Extracting Mondays from a list of dates

  1. #1
    Registered User
    Join Date
    03-03-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    65

    Extracting Mondays from a list of dates

    I have a sequential list of dates (typically Mon-Fri, but not always, due to public holidays) and I am trying to extract the first day of each week into a new column.

    I've spent hours trying vlookup, offset, match, indirect...but I can't get it to come together.

    How can I do this? Thank you!

    Weeks sample.xlsx
    Last edited by macaonghus; 02-16-2014 at 01:49 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,937

    Re: Extracting Mondays from a list of dates

    Have a look at this thread from earlier today: http://www.excelforum.com/excel-form...mn-a-to-e.html

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,369

    Re: Extracting Mondays from a list of dates

    Something like this?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-03-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    65

    Re: Extracting Mondays from a list of dates

    Quote Originally Posted by azumi View Post
    Something like this?
    Azumi, yes, close...your example picks up Mondays, but the working weeks don't always start on Mondays. 27/12/1995 and 02/01/1996 should make it onto the output column, and they don't in your example.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Extracting Mondays from a list of dates

    since dates are numbers you can use this
    =IFERROR(1/LARGE(INDEX(($A$2:$A$38="start of week")*(1/$C$2:$C$38),0),ROWS($A$1:A1)),"")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    03-03-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    65

    Re: Extracting Mondays from a list of dates

    Quote Originally Posted by martindwilson View Post
    since dates are numbers you can use this
    =IFERROR(1/LARGE(INDEX(($A$2:$A$38="start of week")*(1/$C$2:$C$38),0),ROWS($A$1:A1)),"")
    Genius! Solved.

  7. #7
    Registered User
    Join Date
    03-03-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    65

    Re: Extracting Mondays from a list of dates

    Thank you all - ExcelForum is such a satisfying website, the amount of Excel knowhow on here is astounding.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Extracting Mondays from a list of dates

    Hi macaonghus,

    I need to learn more about array formulas and your problem was a chance for me to learn. I added some helper columns to help explain what I've done. See another answer for your problem in the attached. It uses the Array formula (Need to Ctrl+Shift+Enter when entering the formula).
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 05-09-2013, 10:13 AM
  2. Replies: 15
    Last Post: 04-10-2012, 11:34 AM
  3. calculate the number of mondays between 2 given dates
    By Portuga in forum Excel General
    Replies: 3
    Last Post: 03-11-2008, 08:44 PM

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