View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default PULLING OUT CONSECUTIVE ROWS

Try using an Advanced Filter:

With
Your list beginning in A5

A4: Category (the column heading)
A1: Test (or any text that is not a column heading from the list)
A2:
=IF(A5="NBR",AND(A6="STATUS",A7="ITEM"),IF(A5="STA TUS",AND(A4="NBR",A6="ITEM"),IF(A5="ITEM",AND(A3=" NBR",A4="STATUS"),FALSE)))

Note1: in case text wrap impacts the display, there are NO spaces in that
formula.
Note2: that formula refers to the 1st DATA CELL in the List Range. NOT the
column heading (Category).

From the Excel main menu:
<data<filter<advanced filter
List Range: $A$4:$C$34
Criteria Range: $A$1:$A$2
Click the [OK] button

That will return only consecutive NBR, STATUS, ITEM values.

If you want the list of matching items returned to a different range...
Before starting the Advanced Filter, copy the coumn headings from the list
to the destination range. Then use that range in the Copy To field of the
Advanced Filter dialog.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"GARY" wrote:

The cells in Col A contain either "NBR" or "STATUS" or "ITEM".

For example:

NBR
STATUS
NBR
STATUS
NBR <
STATUS <
ITEM <
NBR <
STATUS <
ITEM <
NBR
STATUS
NBR
STATUS
NBR
STATUS
NBR
STATUS
NBR
STATUS
NBR <
STATUS <
ITEM <
NBR
STATUS
NBR
STATUS
NBR <
STATUS <
ITEM <

How can I pull out only the CONSECUTIVE cells containing
"NBR" and "STATUS" and "ITEM"?

(In my example, I've marked these cells with " < ").