+ Reply to Thread
Results 1 to 2 of 2

Loop through log, extract unique name, and populate table with occurrences

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Loop through log, extract unique name, and populate table with occurrences

    Good morning everyone,

    Working on data presentation. I have a log that is populated from elsewhere in the workbook. I would like to be able to have a table update itself as the log changes. In the table I need to capture each unique name and all dates associated with the name. I have a sample attached of what I hoped it would look like when working. Basically I have a place for the name and to the right, cells that represent the months of the year. The data captured has the date in mm/dd/yyyy format and I just need each monthly instance to land in the proper month column in the table. No need for date specific, just the month of the occurrence. I am finding as I learn more and more about excel, that there are many ways to get your desired result. I am open to any ideas, suggestions or solutions.

    Thank you for your help,

    Patrick
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Loop through log, extract unique name, and populate table with occurrences

    1st, I would change the months in F2:Q2 to real dates...1/2/14, 2/1/14 etc, you can format them to show the month names

    Then, use this in E3, copied down...
    =IFERROR(INDEX($C$3:$C$20,MATCH(0,INDEX(COUNTIF($E2:E$2,$C$3:$C$20),0,0),0)),"")
    And then this, copied down and across to count the occurrances...
    =COUNTIFS($C$3:$C$20,$E3,$A$3:$A$20,">="&F2,$A$3:$A$20,"<"&EDATE(F$2,1))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Loop through log, extract unique name, and populate table with occurrences

    Thank you for the reply Ford. I will try your solution a little later today. You suggested that I put in real dates for the F2:Q2. Since an occurrence can happen on any given day, do I need to make 365 different columns, one for each day? I will eventually want to tally the occurrences by month.

    Thanks

    Patrick

+ 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. Extract unique records from table
    By shawnvon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-13-2014, 10:43 AM
  2. Extract unique entries in the table
    By ronnycool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-09-2013, 04:21 AM
  3. Extract unique entries in the table
    By ronnycool in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2013, 04:12 AM
  4. Replies: 2
    Last Post: 02-13-2013, 03:14 PM
  5. A loop to populate a table
    By Darthzo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-17-2013, 02:29 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