Condensing Data in Excel Spreadsheet

theplague187

New Member
Joined
Jan 17, 2014
Messages
3
Hi,

I have a large amount of data that I need to condense in order to minimise file size for emailing.

I need to condense data that looks something like this:
Surname
Address
Suburb
City
Salary
Smith12 1st AvenueEdenHell13500
Smith12 1st AvenueEdenHell35000
Smith12 1st AvenueEdenHell6000
Arnold56 4th StreetEdenHell15000
Arnold56 4th StreetEdenHell18000
Jones198 12th StreetEdenHell22000
Jones198 12th StreetEdenHell9000
Jones67 4th AvenueEdenHell13000

<col style="width: 61pt;" width="81" span="6"> <tbody>
</tbody>


Into something like this:
Surname
AddressSuburbCitySalary
Smith12 1st AvenueEdenHell54500
Arnold56 4th StreetEdenHell33000
Jones198 12th StreetEdenHell31000
Jones67 4th AvenueEdenHell13000

<col style="width: 61pt;" width="81" span="5"> <tbody>
</tbody>


The data I'm working with has a lot more fields than this example, so a pivot table is not an option as the final data needs to be in the same format as the current data. There are also some blank entries in some fields for certain records which are not in error.

Any assistance would be greatly appreciated.

Thanks.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hello,

Personally, I would just make a copy of the sheet (let's name it "Copy") and then:
1. Created unique entries by combining Surname, Address, Suburb, City in both sheets (If, for instance, "Smith" is in A2, then I would put the formula in F2: =A2&B2&C2&D2)
2. On the sheet "Copy", use the built-in function of removing duplicates, based on the formula in F column
3. Use =SUMIF function for Salary on the "Copy" sheet with data from the original sheet, based on column F search criteria

I believe that would pretty much give you what you want.

Hth
 
Upvote 0
Thanks for the suggestion, giving it a try now.

One potential problem I'm anticipating is that there are multiple fields that will need to be summed for duplicates, will I simply need to use the =SUMIF function for each of those fields?
 
Upvote 0
Ok I've completed step 1 of your suggestion, now I need to sum all duplicates for columns B through G.

I can't get the =SUMIF function to work for unspecified entries in column A - i.e. the function requires me to specify the entry in column A.

Now I need to get the data, which now looks like this:
Column A
Column BColumn CColumn DColumn EColumn FColumn G
Identifier
NumberNumberNumberNumberNumberNumber
aaaa444444
aaaa444444
aaaa444444
aaaa444444
aaab444444
aaab444444
aaab444444
aaac444444
aaac444444
aaac444444
aaac444444
aaac444444
aaac444444
aaad444444
aaad444444

<col style="width: 50pt;" width="67"> <col style="width: 50pt;" width="66" span="2"> <col style="width: 50pt;" width="67"> <col style="width: 49pt;" width="65" span="2"> <col style="width: 50pt;" width="67"> <tbody>
</tbody>


to look like this:
Column A
Column BColumn CColumn DColumn EColumn FColumn G
Identifier
NumberNumberNumberNumberNumberNumber
aaaa161616161616
aaab121212121212
aaac202020202020
aaad888888

<col style="width: 50pt;" width="67"> <col style="width: 50pt;" width="66" span="2"> <col style="width: 50pt;" width="67"> <col style="width: 49pt;" width="65" span="2"> <col style="width: 50pt;" width="67"> <tbody>
</tbody>


I can see the light at the end of the tunnel now.
 
Upvote 0
Yes, and to get the unique Identifier, you only need to copy all of them somewhere and remove duplicates (that's why I said to make a copy of the worksheet, it's the easiest).
Let me know if it works the way you imagined it.
 
Upvote 0

Forum statistics

Threads
1,216,122
Messages
6,128,963
Members
449,480
Latest member
yesitisasport

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
Back
Top