Can you display entire rows that match a certain criteria...

J

Jay07

Not sure if this is possible so just want to throw the question out t
you guys.

If I've got masses of data in say sheet1, could I in sheet2 use any kin
of formula that would display every row of sheet1 where that meets
condition.

i.e...


In Cell A1 of Sheet2 :

IF('Sheet1'A1=>1, **DISPLAY HOLE ROW**)

This could result in high number of matches for what I'm trying to d
but is there any way that Excel could display all of these in row
B2:B*HOWEVER MANY MATCHES**



Thoughts?

Cheers
 
P

Pete_UK

Yes, you can set up a formula in a helper column of Sheet1 which
embodies the criteria that you want to apply and establishes a simple
sequence - something like this in P2 (say):

=IF(A2="cat",MAX(P$1:p1)+1,"-")

Copy this down beyond the data that you have (the hyphens will
indicate how far you have copied it).

Then in P2 of Sheet2 you can have a formula like this to return the
rows where those criteria were identified on Sheet1:

=IFERROR(MATCH(ROWS($1:1),Sheet1!P:p,0),"-")

Then in A2 you can have this formula:

=IF(OR($P2="-",$P2=""),"",INDEX(Sheet1!A:A,$P2))

which will retrieve the data from column A in Sheet1. This formula can
be copied across row 2 to retrieve data from other columns, then all
the formulae in row 2 can be copied down as far as you need to (until
hyphens begin to show in column P).

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top