jeffcoleky
Active Member
- Joined
- May 24, 2011
- Messages
- 274
Can someone help me create either a macro or a formula to extract the first 4 names out of each row in column "A". By "Help me create" I mean "Do it for me" because I'm absolutely lost as to where to begin...
The Raw data is all in column A and I want each name output to Columns B, C, D, E depending on how many are found. Any names after the 4th in any given row are not needed. I'd also like to re-order the name to be "First Last" instead of "LAST, FIRST, MIDDLE".
I've placed examples in this sheet of how I expect it will look when finished. If this request for help is unreasonable let me know and I'll try to find another way around this issue.
DOWNLOAD SAMPLE DATA BELOW HERE
Consistent Facts about the Raw Data (Column A):
Macro or Formula should Ignore value if any of the following are true:
-Jeff
Excel 2013
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"] DESIRED OUTPUT [/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]
[TD="bgcolor: #E2EFDA, align: center"]Name1[/TD]
[TD="bgcolor: #E2EFDA, align: center"]Name2[/TD]
[TD="bgcolor: #E2EFDA, align: center"]Name3[/TD]
[TD="bgcolor: #E2EFDA, align: center"]Name4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]18[/TD]
[TD="align: center"]19[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]23[/TD]
[TD="align: center"]24[/TD]
[TD="align: center"]25[/TD]
</tbody>
The Raw data is all in column A and I want each name output to Columns B, C, D, E depending on how many are found. Any names after the 4th in any given row are not needed. I'd also like to re-order the name to be "First Last" instead of "LAST, FIRST, MIDDLE".
I've placed examples in this sheet of how I expect it will look when finished. If this request for help is unreasonable let me know and I'll try to find another way around this issue.
DOWNLOAD SAMPLE DATA BELOW HERE
Consistent Facts about the Raw Data (Column A):
- If more than one name is contained in the string, each is separated by a semicolon
- Name formats are "Last, First, Middle;" or "Last, First;"
- Names will always have at least one comma
- Company names will have at least one or more spaces separating the words
- If a business name is longer than 20 characters long, a ", " is added to the string for each 20 characters
Macro or Formula should Ignore value if any of the following are true:
- Charaters (including spaces) exceed 19 characters (because it must be a company name)
- String contains "&" (because it must be a company name)
- Duplicate to value already gathered from same row
- String is after the 3rd semicolon (only need values for the first 4)
-Jeff
Excel 2013
A | B | C | D | E | |
---|---|---|---|---|---|
HART, JENNIFER, R; GENERAL REVENUE INC; COMMONWEALTH OF OHIO DIVIS, ION OF UNEMPLOYMENT, INSURANCE | Jennifer Hart | ||||
MILLER, JEANNIE, L; MILLER, JEANNIE; MILLER, JOHN, U; MILLER, JOHN; MORTON CENTER; COMMONWEALTH OF OHIO FINAN, CE & ADMINISTRATION, CABINET | Jeannie Miller | John Miller | |||
DELACRUZ, CHRIS; DELACRUZ, CHRIS, B | Chris Delacruz | ||||
UNITED STATES OF AMERICA SECRE, TARY OF HOUSING & UR, BAN DEVELOPMENT; HARRELL, ESTELLE, C; HARRELL, DORSEY, E | Estelle Harrell | Dorsey Harrell | |||
RAGAINS, SEBRINA, N; RAGAINS, RICHARD, C; RAGAINS, RICHARD; UNIVERSITY OF UROLOGY PLLC; TIPTON & UNROE PSC; MIDLANE PARK NEIGHBORHOOD ASSN, INC | Sabrina Ragains | Richard Ragains | University Of Urology Pllc | ||
WILCHER, ANTHONY, L; REPUBLIC BANK & TRUST CO | |||||
SIMPSON, JACQUELINE | |||||
LE, SON, VAN; LE, THUYLIEU, THI | Son Le | Thi Thuylieu | |||
SCRUGGS, ALMA, H; SCRUGGS, ALMA, JEAN; CITIFINANCIAL SERVICES INC; COMMERCIAL CREDIT CORP; UNION TRUST INC; ARROWOOD IDEMNITY CO; ROYAL INDEMNITY; CAPITAL ONE BANK USA NA; CAPITAL ONE BANK; ANDERSSON ANDERSSON COUNTY ME, TRO GOVERNMENT | Alma Scruggs | Citifinancial Services Inc | Citifinancial Services Inc | ||
COLVIN, TODD; COLVIN, ERIC; BANK OF ANDERSSON & TRUST CO; THE ESTATE OF ROBERT WAYNE COLVIN | Todd Colvin | Eric Colvin | |||
KNIGHT, NOLAN, A | Nolan Knight | ||||
TATE, MARIO, EXR; TATE, MARIO, A EXR; UNITED STATES OF AMERICA SECRE, TARY OF HOUSING & UR, BAN DEVELOPMENT; ANDERSSON ANDERSSON COUNTY ME, TRO DEPARTMENT OF CO, DES & REGULATIONS; CITIMORTGAGE INC; COMMONWEALTH OF OHIO CABIN, ET FOR HUMAN RESOURC, ES DIVISION OF UNEMP; BILARCZYK, NADINE | Mario Tate | ||||
SMITH, LORA, A; SMITH, LORA, ASHLEY; SMITH, ASHLEY; PROVIDIAN NATIONAL BANK; SMITH, JOSEPH; SMITH, JOSEPH, JR; SMITH, JOSEPH, L JR; BROWN, MICHAEL; NATIONAL CITY REAL ESTATE SERV, ICES LLC; NATIONAL CITY MORTGAGE CO; ARROW FINANCIAL SERVICES LLC; OEM COATINGS; AUTOVEST LLC; SMITH, MARTHA, EXR; ANDERSSON ANDERSSON COUNTY ME, TRO GOVERNMENT; CNAC; COMMONWEALTH OF OHIO WORKF, ORCE DEVELOPMENT CAB, INET EX REL DIVISION; EQUITABLE FINANCIAL SERVICES L, LC; CAPITAL ONE BANK USA NA; CAPITAL ONE BANK; ALBAN USED CARS I LLC; ALBAN USED CARS INC; FIRST RESOLUTION INVESTMENT CO, RP; COMMONWEALTH OF OHIO FINAN, CE & ADMINISTRATION, CABINET; BBC CHECK ADVANCE LLC; UNITED STATES OF AMERICA DEPAR, TMENT OF THE TREASUR, Y INTERNAL REVENUE S; NORTON HEALTHCARE INC; REPUBLIC BANK & TRUST CO; ECKART LLC; STONE CREEK FINANCIAL; ANDERSSON ANDERSSON COUNTY ME, TRO REVENUE COMMISSI, ON | Lora Smith | Ashley Smith | |||
FOREE, MICHAEL, W JR; FOREE, MICHAEL, JR; FOREE, DEMITRIA, V; FOREE, DEMETRIA, V; FOREE, DEMITRIA; NORTON AUDUBON HOSPITAL; NORTON HEALTHCARE INC; DR GREGORY CECIL DMD LLC; ANDERSSON ANDERSSON COUNTY ME, TRO DEPARTMENT OF IN, SPECTIONS PERMITS & | Michael Foree | Demitria Foree | |||
TRAN, NGOC; LE, HAJ, P; LE, HAI, P | Ngoc Tran | Haj Le | |||
DEWALT, DAVID, J; DEWALT, KESHA, R; CHEMICAL MORTGAGE CO | David Dewalt | Kesha Dewalt | Mortgage Chemical | ||
ABERNATHY, VELDA, J; COLVIN, WILMA, M; ABERNATHY, WILMA, M; TRILOGY HEALTHCARE OF JEFFERSO, N LLC; FRANCISCAN HEALTH CARE CENTER | Velda Abernathy | Wilma Colvin | Wilma Abernathy | ||
ZACHARY, REGINA, C; B&B FUNDING LLC | Regina Zachary | ||||
FRENCH, STENNIS; FRENCH, REGINA; NATIONAL CITY MORTGAGE CO; SECRETARY OF HOUSING & URBAN D, EVELOPMENT; HOUSEHOLD FINANCE CORP II; CAPITAL ONE BANK | Stennis French | Regina French | |||
CRAIG, JOHN, P JR; BLACK, LINDA; OHIO HOUSING CORP | John Craig | Linda Black | |||
CLAY, PAUL; CLAY, PAUL, EUGENE III; CLAY, NANCY, G | Paul Clay | Nancy Clay | |||
BREWER, CRAIG, L; BREWER, DONNA; BREYER, DONNA, Y; ANDERSSON ANDERSSON COUNTY ME, TRO GOVERNMENT; ANDERSSON ANDERSSON COUNTY ME, TRO DEPARTMENT OF CO, DES & REGULATIONS; CLINICAL PATHOLOGY ASSOCIATES, INC; CPA LABS; BARDSTOWN IMMEDIATE CARE CENTE, R | Craig Brewer | Donna Brewer | |||
CRAWFORD, ROY; CRAWFORD, TRESSA; COMMONWEALTH OF OHIO EDUCA, TION CABINET EX REL, DIVISION OF UNEMPLOY; BILLTOWN FARM HOMEOWNERS ASSN, INC; DEUTSCHE BANK NATIONAL TRUST C, O, TR; FIRST FRANKLIN MORTGAGE LOAN T, RUST, TR | Roy Crawford | Tressa Crawford |
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"] DESIRED OUTPUT [/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]
RAW DATA
[/TD][TD="bgcolor: #E2EFDA, align: center"]Name1[/TD]
[TD="bgcolor: #E2EFDA, align: center"]Name2[/TD]
[TD="bgcolor: #E2EFDA, align: center"]Name3[/TD]
[TD="bgcolor: #E2EFDA, align: center"]Name4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]18[/TD]
[TD="align: center"]19[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]23[/TD]
[TD="align: center"]24[/TD]
[TD="align: center"]25[/TD]
</tbody>
Sheet1