+ Reply to Thread
Results 1 to 2 of 2

Sorting huge list of dates

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Sorting huge list of dates

    Hi there,

    I have aroudn 1000 entries, each with a corresponding date over a 5 week period. I'm trying to either create a formula or write
    a basic VBA script (brand new to VBA) to go through the five weeks of data and print out the date of the end of each week (Friday).
    So for example, if I have a bunch of dates ranging from, say, 6/11/12 to 7/11/12, I want to be able to print out
    5 dates: 6/15/12, 6/22/12, 6/29/12, 7/6/12, and 7/13/12, as these are the Fridays (week end) of each of those weeks.

    Any ideas of how to approach this?

    Thanks!

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Sorting huge list of dates

    You can try this, adapted from a sub by MickG

    Please Login or Register  to view this content.
    Or this formula by NBVC
    =IF(AND(WEEKDAY(A1,2)=5,MOD(SUMPRODUCT(--(WEEKDAY($A$1:A1,1)=5)),1)=0),A1,"")
    Pasted in say B1 and dragged down
    You will have to amend the number in red depending on what the 1st date is
    Last edited by WasWodge; 06-15-2012 at 10:32 AM. Reason: Grammar
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

+ 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