Home |
Search |
Today's Posts |
#6
![]() |
|||
|
|||
![]()
Aha, so *that's* what you want <g
Let's try this: Assume this table is in Sheet1, cols A to C, data from row2 down Order No Order QTY DO QTY CO1 1000 200 CO1 1000 100 CO2 300 10 CO2 300 5 CO2 300 20 Using 2 empty cols to the right, say cols E and F Put in E2: =A2&B2 Put in F2: =IF(E2="","",IF(AND(COUNTIF($E$2:E2,E2)1,COUNTIF( $B$2:B2,B2)1),0,ROW())) Select E2:F2, fill down to say F1000 to cover the max number of rows that data is expected in the table (can copy down ahead of expected data) In Sheet2 --------- Paste the same headers into A1:C1 Order No Order QTY DO QTY Put in A2: =IF(Sheet1!A2="","",Sheet1!A2) Put in B2: =IF(Sheet1!F2="","",IF(Sheet1!F2<0,Sheet1!B2,Shee t1!F2)) Put in C2: =IF(Sheet1!C2="","",Sheet1!C2) Select A2:C2, fill down to C1000 (fill down by the same number of rows that was catered for in Sheet1) For the sample data in Sheet1, you'll get the desired results: Order No Order QTY DO QTY CO1 1000 200 CO1 0 100 CO2 300 10 CO2 0 5 CO2 0 20 ( rest are blanks: "" ) Note that the above is now *conditional* on the Order No and Order Qty being grouped together in the source table in Sheet1 (as per the sample posted) -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- "Jeffrey" wrote in message ... Hi Max and Herbert, Thank you so much for the advise. I tried and it works but I was wondering wheather it is possible to have the end result like below: Order No Order QTY DO QTY CO1 1000 200 CO1 0 100 CO2 300 10 CO2 0 5 CO2 0 20 Thks & Rgds, Jeffrey |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with data not getting plotted | Excel Discussion (Misc queries) | |||
Help with data not getting plotted | Charts and Charting in Excel | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions | |||
Charting data ranges that change | Charts and Charting in Excel | |||
Running Data Table using an input that triggers DDE linked data | Excel Discussion (Misc queries) |