+ Reply to Thread
Results 1 to 7 of 7

Finding first and last occurances whats the best way?

  1. #1
    Registered User
    Join Date
    03-02-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2003/2010
    Posts
    3

    Finding first and last occurances whats the best way?

    Hi everyone, I'm new here so please bear with me if I've not given you all the details you need!!

    I have a spreadsheet of data which I need to manipulate. I need to find the first and last entries for a date but I can't work out how best to do it I've provided an example below, have you any suggestions?
    Column A: Date Format YYYY-MM-DD HH:MM
    Row 1: 03/01/2012 09:13
    Row 2: 03/01/2012 09:13
    Row 3: 03/01/2012 09:13
    Row 4: 03/01/2012 16:47
    Row 5: 03/01/2012 16:59
    Row 6: 12/01/2012 09:14
    Row 7: 12/01/2012 09:14
    Row 8: 12/01/2012 09:14
    Row 9: 12/01/2012 17:04
    Row 10: 12/01/2012 17:04
    Row 11: 12/01/2012 17:42

    etc etc...
    Last edited by Mary87; 03-02-2012 at 10:16 AM. Reason: Change to Title as per comment from Pepe Le Mokko

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Can Anyone Help me manipulate my data?

    Hi and welcome to the board

    Maybe first contact a mod to move your post to a correct forum, and also adapt thread title per forum rules ;-)

  3. #3
    Registered User
    Join Date
    03-02-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2003/2010
    Posts
    3

    Re: Can Anyone Help me manipulate my data?

    Hi Pepe Le Mokko,
    Thanks for that, I'd not got as far as reading the rules yet, I hope the change to title is better and conforms? :S Where best do you think this question would be suited?
    Thanks xx

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Finding first and last occurances whats the best way?

    Thread moved to Excel General.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Finding first and last occurances whats the best way?

    So for your example if you were searching 03/01/2012 09:13
    It should return row 1 and row 3?

  6. #6
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Finding first and last occurances whats the best way?

    Try =MATCH(B2,$A$1:$A$11,0) for the first occurence and =MATCH(B2,$A$1:$A$11,1) for the last occurence.

    The first occurence works perfectly the Last occurence seems to be very temperamental.

    Anyone help me out why the second formula some times and sometimes doesn't work?
    Last edited by darknation144; 03-02-2012 at 10:42 AM.

  7. #7
    Registered User
    Join Date
    03-02-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2003/2010
    Posts
    3

    Re: Finding first and last occurances whats the best way?

    Hi darknation144,
    It would return row 1,2 and 3 yes. but what I'm actually trying to get (sorry I've not explained myself properly!!) is Row 1 and Row 5, then Row 6 and Row 11. Because they hold the first and the last events for each day. Does that help at all?
    Essentially I have a worksheet with thousands of entries but I only need the first and last one for each individual date, so I'm looking to be able to write a macro or use some sort of conditional formatting to do it for me rather than having to go through even line myself to find the data.
    Thanks in advance everyone! xx

+ 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