Consolidating info from multiple lists

Marika Pieterse

New Member
Joined
Sep 14, 2010
Messages
12
I have multiple sheets containing data. I need to consolidate these into a single list.

sheet 1 - name AAA contains 700 records but records can be added or deleted any time
sheet 2 - name BBB contains 199 records but records can be added or deleted any time
sheet 3 - name CCC contains 803 records but records can be added or deleted any time

I have set-up an INDEX sheet where each sheet's name and the count of records appear. I used =INDEX(A3:A1700,COUNT(A3:A1700)) to read the number of records for each sheet. This is then picked up in the INDEX sheet.

In the COMBINED sheet, I have a sequence nr that is the count (from 1 to n) for the sheet.
I then use the following formula =IF(ROWS($C3:D3)<=$B3,SMALL(IF($B3>=AAA!$A$3:$A$1700,IF($B3<=AAA!$A$3:$A$1700,ROW(AAA!$A$3:$A$1700)-ROW(AAA!$A$3)+1)),ROWS($C3:D3)),"") to pick up the row number for the sequence number of the corresponding row in the sheet.
I then use the formula =IF(N($D3),INDEX(AAA!$A$3:$CC$1700,$D3,MATCH(E$2,AAA!$A$2:$CC$2,0)),"") to pick up the content of the cells that I need from the individual sheets.

The problem is that I need to update the COMBINED sheet dynamically as rows are added or deleted, but I don't know
(1) how to determine the sheet name in the formula from another cell in the combined sheet
(2) how to tell excel that it must continue with the sequence number until it has reached the number on the index (i.e. for AAA = 700 records) and then start with the BBB sheet's data and so on

Should I write a macro? Any assistance would be great!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,224,517
Messages
6,179,240
Members
452,898
Latest member
Capolavoro009

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