Tuesday, January 14, 2020

microsoft excel 2007 - How to combine values from multiple rows into a single row

I have an Excel 2007 spreadsheet with 2250 rows and 19 columns. In these rows, I may have two rows of duplicate customer information that need to be combined, but only if the cell above is empty. I may also have rows of customer data that are not in need of combining. A unique customer member number can be used to identify the rows that need to be combined together. I'm struggling on developing the right VBA script to combine the unique customer data into the one row (on top) and delete the row that is remaining after combining. Is anyone willing to assist? It will save me hours/days of hand combining these rows and we are in the middle of a time sensitive audit.


Sample of our data:



MEMBER FIRST NAME MEMBER LAST NAME MEMBER # MVP SYSTEM ENTRY DATE ENROLL DATE MVP POINTS DRAWING ENTRIES ENROLL FORM? POINTS CORRECT? POINTS MISSED FINAL POINTS DRAWING ENTRIES SP Talon # WP Talon # BD DEPT EMPLOYEE NOTES DLR
Gene S 550061 3/2/2013 0 0 0 #N/A
Gene S 550061 3/2/2013 1539 137 MC MJ SP
Steve G 550087 3/2/2013 30019 1588 PA NR WP
Curtis S 550128 4/24/2013 5 0 5 #N/A
Curt S 550128 4/24/2013 358 47 MC MJ SP

Edit (not from OP) to add pipe/paragraph delimited version with underlines for spaces in headings:


MEMBER_FIRST_NAME|MEMBER_LAST_NAME|MEMBER_#|MVP_SYSTEM_ENTRY_DATE|ENROLL_DATE|MVP_POINTS|DRAWING_ENTRIES|ENROLL_FORM?|POINTS_CORRECT?|POINTS_MISSED|FINAL_POINTS|DRAWING_ENTRIES|SP_Talon_#|WP_Talon_#|BD|DEPT|EMPLOYEE|NOTES|DLR
Gene|S|550061|03/02/2013||0|0||||0|#N/A|||||||
Gene|S|550061||03/02/2013||||||||1539|137||MC|MJ||SP
Steve|G|550087||03/02/2013||||||||30019|1588||PA|NR||WP
Curtis|S|550128|4/24/2013||5|0||||5|#N/A|||||||
Curt|S|550128||4/24/2013||||||||358|47||MC|MJ||SP

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...