+ Reply to Thread
Results 1 to 7 of 7

Copy latest date of every month from a column in excel 2007

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Copy latest date of every month from a column in excel 2007

    Hi,
    I'm new here and I desperately need help in my work. I have a spreadsheet with test data. Column A has the dates from 1878 to 2013 and column B to D have the test results. Some months had two or more tests done and some had just one. Is there a way I can collect only the data for the last entry for the month. Below is the example:

    10/1/1984 902 437 8
    10/12/1984 959 473 8
    10/18/1984 989 488 9
    10/26/1984 1,030 506 9

    I just want to copy the row for 10/26/1984 and ignore the rest. This occurs for multiple months and I don't want to got through the entire spreadsheet copying them one after the other. Help Please!!!

    Thanks

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Copy latest date of every month from a column in excel 2007

    Given that the data is sorted by date, try the macro included and the last entries of each month are listed in sheet2
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy latest date of every month from a column in excel 2007

    Thank you rcm. I was wondering if there is there a way to do it without macros.

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Copy latest date of every month from a column in excel 2007

    No that I know of, but it can be automated to changing values or a row is added on the sheet or triggered by a button inserted in the sheet or anywhere int the workbook.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy latest date of every month from a column in excel 2007

    Column A has the dates from 1878...
    Is that supposed to be 1978?

    You could use formulas (if that's even practical).

    Let's assume your data is in the range A2:D5.

    In some cell enter the month and year as a text entry:

    F2 = Oct 1994 (as a text string)

    Enter this formula in G2 and copy across to I2:

    =LOOKUP(2,1/(TEXT($A$2:$A$5,"mmm yyyy")=$F2),B$2:B$5)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    03-06-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy latest date of every month from a column in excel 2007

    Thank you guys for your help. And yes, that was supposed to be 1978 not 1878.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy latest date of every month from a column in excel 2007

    You're welcome!

+ 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