+ Reply to Thread
Results 1 to 9 of 9

Need help merging multiple rows into one with the same ID in excel 2007

Hybrid View

kalex23 Need help merging multiple... 05-29-2012, 11:22 PM
abousetta Re: Need help merging... 05-30-2012, 01:16 AM
kalex23 Re: Need help merging... 05-30-2012, 01:19 AM
abousetta Re: Need help merging... 05-30-2012, 01:25 AM
abousetta Re: Need help merging... 05-30-2012, 01:27 AM
kalex23 Re: Need help merging... 05-30-2012, 01:30 AM
abousetta Re: Need help merging... 05-30-2012, 01:33 AM
kalex23 Re: Need help merging... 05-30-2012, 01:38 AM
abousetta Re: Need help merging... 05-30-2012, 01:49 AM
  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Need help merging multiple rows into one with the same ID in excel 2007

    To start with....I'm a macros newbie, and slightly frightened by them. Ok, that disclaimer is out there.

    What I need to do is combine multiple rows into one in my voter list. It currently looks like this:

    Voter ID Electiondate Electiondescription VotingMethod
    4416 11/5/1996 State General P
    4416 11/3/1998 State General P
    4416 11/7/2000 State General P
    6629 11/2/1993 School Board Election P
    6629 11/8/1994 STATE GENERAL P
    6629 11/7/1995 SCHOOL BOARD ELECTION P
    6629 11/5/1996 STATE GENERAL P
    6629 11/3/1998 STATE GENERAL P
    6629 11/2/2004 11/02/2004 - STATE GENERAL P

    But I need it to look like:

    VoterID ElectionDate1 ElectionDescription1 VotingMethod1 ElectDate2 ElectionDescrp2 votingMethod2 Electiondate3....etc (depending on how many time they voted.
    4416 11/5/1996 State General P 11/3/1998 STate General P 11/7/2000

    Attached is a sample of the data as it's pretty big file

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    Hello and welcome to the forum. So you want to remove all duplicates (same voter ID). Would any of the other information be of importance to you? Or do you just want the first instance when a person voted?
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    05-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    Actually I just need the 2008, 2010 and 2011 data. All the rest can be scrapped.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    You could just use the filter to get that data.

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    For example, here are the first 20 results after filtering:

           ---F--- -----G------ --------------H--------------- -----I------
       1   VoterId ElectionDate ElectionDescription            VotingMethod
       2      4416 11/4/2008    11/04/2008 - STATE GENERAL     A           
       3      4416 11/2/2010    11/02/2010 - STATE GENERAL     A           
       4      6629 11/4/2008    11/04/2008 - STATE GENERAL     P           
       5      7608 11/4/2008    11/04/2008 - STATE GENERAL     P           
       6      7608 8/10/2010    08/10/2010 - STATE PRIMARY     P           
       7      7608 11/2/2010    11/02/2010 - STATE GENERAL     P           
       8     10338 11/4/2008    11/04/2008 - STATE GENERAL     P           
       9     10338 11/2/2010    11/02/2010 - STATE GENERAL     P           
      10     10390 11/4/2008    11/04/2008 - STATE GENERAL     P           
      11     10545 11/4/2008    11/04/2008 - STATE GENERAL     P           
      12     10545 11/2/2010    11/02/2010 - STATE GENERAL     P           
      13     10545 11/8/2011    11/08/2011 - MUNICIPAL GENERAL P           
      14     10587 11/4/2008    11/04/2008 - STATE GENERAL     P           
      15     10597 11/4/2008    11/04/2008 - STATE GENERAL     P           
      16     10597 8/10/2010    08/10/2010 - STATE PRIMARY     P           
      17     10597 11/2/2010    11/02/2010 - STATE GENERAL     P           
      18     10597 11/8/2011    11/08/2011 - MUNICIPAL GENERAL P           
      19     11619 11/4/2008    11/04/2008 - STATE GENERAL     A           
      20     11619 11/2/2010    11/02/2010 - STATE GENERAL     P

  6. #6
    Registered User
    Join Date
    05-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    That would work if that was all I needed. I have to then merge this data with the demographic info which is in a separate file. This paper is giving me a headache. But I think I figured out how to get what I needed with pivot table. Thanks.

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    Once you have the unique ones, you can use vlookup or index/match to get the remaining information from the other file.

  8. #8
    Registered User
    Join Date
    05-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    Actually, I'm using ablebits to map/match the two files.

  9. #9
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Need help merging multiple rows into one with the same ID in excel 2007

    I haven't used it before. Anyways, if you are satisfied with the responses the please mark the thread as solved.

    Good luck.

    abousetta

+ 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