D
DavidS
Hello, I'm getting a #REF! error with your formula (my original message and
your response is below. I have assumed that Patterns is a name which refers
to the entire column of data containing the patterns. Also, that Dimension1
is the array containing the data of interest - that is the entire data from
the top left cell to bottom right. Is this correct? Does there have to be a
1 to 1 correspondence between each row on the new worksheet and the one
containing the data. If so, that would
mean there would be blank rows in the new worksheet as the corresponding
data sheet would not have the patten specified in the formula. Many thanks
for your help, David
-----------------------------------------
Your response to my question:
Create a PIVOT table is the best solution
If you prefered the formula then try this:
Sheet2
In A1:
=IF(ISERR(SMALL(IF(Patterns="Lines",ROW(INDIRECT("1:"&ROWS(Patterns)))),ROWS($1:1))),"",INDEX(Dimension1,SMALL(IF(Patterns="Lines",ROW(INDIRECT("1:"&ROWS(Patterns)))),ROWS($1:1))))
ctrl+shift+enter, not just enter
Drag the Fill Handle from A1 all the way down as far as needed
Copy from A1 to B1 and change Dimension1 to Dimension2
Drag the Fill Handle from B2 all the way down as far as needed
your response is below. I have assumed that Patterns is a name which refers
to the entire column of data containing the patterns. Also, that Dimension1
is the array containing the data of interest - that is the entire data from
the top left cell to bottom right. Is this correct? Does there have to be a
1 to 1 correspondence between each row on the new worksheet and the one
containing the data. If so, that would
mean there would be blank rows in the new worksheet as the corresponding
data sheet would not have the patten specified in the formula. Many thanks
for your help, David
-----------------------------------------
Your response to my question:
Create a PIVOT table is the best solution
If you prefered the formula then try this:
Sheet2
In A1:
=IF(ISERR(SMALL(IF(Patterns="Lines",ROW(INDIRECT("1:"&ROWS(Patterns)))),ROWS($1:1))),"",INDEX(Dimension1,SMALL(IF(Patterns="Lines",ROW(INDIRECT("1:"&ROWS(Patterns)))),ROWS($1:1))))
ctrl+shift+enter, not just enter
Drag the Fill Handle from A1 all the way down as far as needed
Copy from A1 to B1 and change Dimension1 to Dimension2
Drag the Fill Handle from B2 all the way down as far as needed