View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheetfunctions,microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Extract row based on a criteria

I'd just select the range and do Data|filter|Autofilter

then show the items you want
(and copy them to a new sheet if really necessary)

Mah wrote:

I have a large worksheet like Table-1 with few thousands rows.
Occasionally I need to create a subset of the data like the Table-2.

Table-1:
A B C
1 Item Department Amount
2 10 X 45
3 20 Y 23
4 30 X 65
5 20 X 23
6 20 Z 28
7 50 X 44
8 20 X 32
9 60 Y 55

Table-2:
Item Department Amount
20 Y 23
20 X 23
20 Z 28
20 X 32

How do I automate the extraction of rows (based on an Item) from the
Table-1 to produce an output like the Table-2?

Thanks for any suggestion of function, formula or simple macro.

Sincerely
Mah.


--

Dave Peterson