In the attached file I have inserted a new row 1 in Sheet1 and put this formula in B1:
Formula:
=IF(B2,MAX($A1:A1)+1,"")
which is then copied across to cell AY1. It identifies the columns that meet the criteria, and gives each one a unique sequential number. I've coloured this blue to show that it is a helper row (which can be hidden once it is set up).
In Sheet2 I have put 1 in cell A1 and this formula in B1:
Formula:
=IF(COLUMNS($A:B)-1>MAX(Sheet1!1:1),"",MATCH(COLUMNS($A:B)-1,Sheet1!1:1,0))
and again, this is copied across to cell AX1. I've put this formula in B2:
Formula:
=IF(B$1="","",INDEX(Sheet1!$2:$56,ROWS($1:1),B$1))
which can then be copied down to B56 to return the data from the row given in B1. I've applied red to B2 and emboldened B3 to match the look of Sheet1, and then the block of formulae in B2:B56 can be copied across as far as you need them (i.e. to column AX), although I have only copied to column H to keep the file size down. I've also copied B3:B56 into column A, although as these are fixed values you could just copy that from Sheet1.
You will need to copy the formulae across your sheet, and then you can play about with it - if you change any of the TRUE values to FALSE, or any of the FALSE values to TRUE in Sheet1, those changes will immediately be reflected in Sheet2.
Hope this helps.
Pete
Bookmarks