View Single Post
  #2   Report Post  
Max
 
Posts: n/a
Default

One way ..

Assuming the table below is
in Sheet1, cols A to E,
data from row2 down

Description SKU Quantity Price Cost
Product A 1001 100 10.00 5.00
Product B 1002 0 15.00 10.00
Product C 1003 150 8.00 4.00


Put in G2: =IF(C2="","",IF(C20,ROW(),""))

Copy G2 down as many rows as data is expected
in the table, say down to G100?
(can copy down ahead to cater for expected data input)

In Sheet2
-------------
With the same headers in A1:E1, ie:
Description SKU Quantity Price Cost


Put in A2:

=IF(ISERROR(MATCH(SMALL(Sheet1!$G:$G,ROW(A1)),Shee t1!$G:$G,0)),"",OFFSET(She
et1!$A$1,MATCH(SMALL(Sheet1!$G:$G,ROW(A1)),Sheet1! $G:$G,0)-1,COLUMN(A1)-1))

Copy A2 across to E2, fill down by
as many rows as per col G in Sheet1,
i.e. down to E100

(Format cols D and E as currency)

The above will extract the desired rows from Sheet1,
viz. for the sample data, you'll get:

Description SKU Quantity Price Cost
Product A 1001 100 10.00 5.00
Product C 1003 150 8.00 4.00

< rest are blanks

Adapt / extend to suit
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Bill Johnson" <Bill wrote in message
...
I need to pull certain values in rows of data into another tab in a

worksheet
but only if the quantity colum contains a value 0. I am currently using

an
if statement but it makes me populate a value for even false criteria.

Does anyone know how I can only pull over cells in a row where my quantity
column value is 0.

Source Tab
Example
Description SKU Quantity Price Cost
Product A 1001 100 10.00 5.00
Product B 1002 0 15.00 10.00
Product C 1003 150 8.00 4.00

Detination Tab - I would like these results
Product A 1001 100 10.00 5.00
Product C 1003 150 8.00 4.00

Destination Tab - What I Have Today
Product A 1001 100 10.00 5.00
- - - - -
Product C 1003 150 8.00 4.00

These rows with no values are not valuable and I want to get rid of them.

Any help appreciated!