See attached file for a formula-based solution.
In each of the 5 subsidiary files, I have used column H as a helper column (coloured blue), with this formula in H4:
When this is copied down, it sets up a sequential numbering of the records. Hyphens are used to indicate how far it has been copied (to row 24 in each sheet), so you can easily copy this down further in each sheet if necessary. Cell H1 in the first sheet is set to zero, but H1 in the other sheets looks back at the previous sheet to find the last number used, with a formula like this (in the second sheet):
so in effect those sequential numbers run in sequence through the 5 sheets.
In the Master sheet I have listed the five sheet names in column K, and summarised the last number used in each sheet in column L - note that cell L2 must be set to zero. Then this formula in H4 of the Master sheet:
gives the sheet name, and this one in I4:
gives the row number of where each sequentially-numbered record can be found. It is then quite straightforward to retrieve the data in column A of the appropriate sheet, using this formula in A4:
Note that some column A and some column D entries are missing in the subsidiary sheets, hence the need to test for IF(INDEX() = "" ...
Similar formula in columns B to F retrieve data from the appropriate columns of the sheet and row given in columns H and I. The formulae from A4 to I4 can then be copied down as far as is required (row 46 in the example file, though you can copy further if you have more data) - the hyphens in column I help to show how far.
Note that this is fully self-adjusting, so if you add a new record to the first sheet, say, then all the records on the Master sheet will move down automatically in order to accommodate it.
If you are satisfied that the formulae have been copied down far enough to accommodate future data, then you can hide all the helper columns (blue). I've left your Sheet6 in the file so you can check the results, but this can be deleted when you are satisfied that the file does what it is meant to do.
Hope this helps.
Pete
Bookmarks