Formatting a Mess

Kayla

New Member
Joined
Apr 2, 2008
Messages
13
Setup of what my spreadsheet currently looks like: several rows of people's names in various formats ( repeated) along with different info in each row/column for the same person. Generically, it looks like this:
Last Name First Name X Y Z
Smith Toby yes
Smith Toby R. no
Smith, Toby yes

What I need to get at: finding a way to condense all the info so each person only has 1 row with the various information pertinent to them. Ideally look like this:
Last Name First Name X Y Z
Smith Toby yes no yes

What kind of formula can help me do this without going through each row line by line?
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

EugeneCarter

Board Regular
Joined
Jul 10, 2008
Messages
75
I'd suggest the first step would be to get it into tabular format.
I'm guessing that your X,Y,Z columns are consistent, but the first / last names maybe have a variety of variations on naming the same person.
So move the X,Y,Z columns to the start, put a few blank columns in between the last & first name, so you end up with X,Y,Z,Last,blank,blank,First,blank,blank

Then select column 'Last name' and do "Text to Columns" on delimited by spaces (or however your data is messed up). Repeat for 'First name'
Then turn on data auto filter, and cleanse the inconsistent records. I find looking for 'non-blanks' on the last columns and working inwards tends to be fastest.. You maybe will also just want to delete all these values (such as middle initial, prefix "mr.", etc. .. That's a judgement call.

Then you can concatenate them back together if you wish, and you'll have Last, First, X, Y, Z as you wanted them to put in the first place.
 

EugeneCarter

Board Regular
Joined
Jul 10, 2008
Messages
75
This may not be the most eligant way to get everything into one line, but it should be sufficient.
I'm assuming your values are binary.. Yes/No.. if there's more options, you'll need to adjust this.

Now that you've cleansed the data, do a find/replace in columns X,Y,Z and replace Yes with 1, and No with 0
Then do a pivot table on this data, and put the names on the rows and sum(x),sum(y),sum(z) on the headings as data.
*Note: if you have a sum() > 1, you'll know that there's a data anomoly. Also check for count(). Then you can use min() or max(), depending on the business rules you wish to apply.
You won't need subtotals or grand totals, so hide those.
Once you have good data in the pivot (refresh data after you adjust the data table) copy & paste values the pivot table and do a find/replace 1/0 for Yes/No, and you should have what you wanted.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,223
Messages
5,594,908
Members
413,952
Latest member
JGer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top