Reordering data from several sheets into one

alhajoth

New Member
Joined
Jul 22, 2009
Messages
48
I have a workbook consisting of 58 sheets. I want the data from the other 57 sheets combined into one table in the 58th sheet.
The data-sheets are all identical, they look like this:
Some heading
5 min10min15min20min30min60min
000123424343322234313432
000234334444555566667777
11118888
9999

<tbody>
</tbody>

The tables shows zipcodes within a certain range from a point. There are one sheet per point, the 6 distances (5, 10, 15, 20, 30 and 60) are always the same.
Each zipcode should only appear once per sheet, but due to errors in dataentry etc, there may be duplicates. So thats task 1, removing duplicates. In case of duplicates, the zipcode should always remain in the left-most column.

The columns are always constant, the number of rows will vary greatly from column to column and from sheet to sheet.

What I want to create in sheet 58 is the following table:

ZIPCODESsheet1sheet2sheet3sheet4sheet5
000151015560
000215306020
00035510

<tbody>
</tbody>


Where each possible zipcode is listed in rows, and the distance from each sheet is listed. The column-headings are identical to the sheet-names.
There are 3351 total zipcodes, they do not all appear in the data-sheets, but they are in my masterlist. There will by 58 columns total, the zipcodes and 57 columns corresponding to the sheets.

So what is the simplest and quickest way to do this?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
On the assumption that your 57 sheets are named as shown (i.e. Sheet1, Sheet2, etc.):

1. On your summary sheet, set up headings in A1:BF1 as you've shown in the second table, viz:
ZIPCODES
sheet1sheet2sheet3sheet4
sheet5 .... Sheet57

<tbody>
</tbody>
(The column headings in B1:BF1 must be EXACTLY the same as the sheet/tab names - ensure there are no spaces in either!)

2. In B2, enter the following formula:
=COUNTIFS( INDIRECT( B$1 & "!A:F"), $A2 )
then copy to B2:BF3353.

Voilà!
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

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