You are on page 1of 4

ref

cust_id nama line_id lokasi no_seri produk material_id material warna_id warna
1 P.T. Az, Tbk GK Sunter 24 benda A al Aluminium BLA Hitam
2 C.V. Bp GL Cikarang 27 benda B br Kuningan BLU Biru
3 U.D. Xx GM Tangerang 101 benda C fe Besi BRO Coklat
4 P.O. Ijk 105 benda D fi Fiber GRN Hijau
311 benda E gl Kaca NON Natural
317 benda F pl plastik RED Merah
320 benda G wd Kayu WHI Putih
456 benda H YEL Kuning
invoice

tgl_inv inv_id tgl_delivery


1/11/2010 1001 1/31/2010
1/17/2010 2001 2/6/2010
1/17/2010 3001 2/6/2010
1/21/2010 2002 2/10/2010
2/13/2010 1002 3/5/2010
2/13/2010 2003 3/8/2010
3/5/2010 3002 3/29/2010
order_detail

inv_id product_id qty price disc


1001 GL105alGRN 2,500 131.00 1.00%
1001 GL317wdGRN 1,750 136.70 0.00%
2001 GL317alGRN 2,100 133.15 1.00%
3001 GL105alGRN 2,250 132.75 0.00%
2002 GM105glNON 1,250 133.23 0.00%
1002 GL105glNON 1,100 131.00 0.00%
2003 GM024glNON 250 234.00 1.50%
3002 GM105wdBRO 4,725 137.00 2.15%

Berapa kali customer 1 mendapatkan discount ? Buat daftar 3 (tiga) harga jual (price) tertinggi untuk produk yang di produksi pada lokasi GL!
step 1 step 2 step 3 step 4 step 5 step 6 step 1 step 2 step 3 step 4

IF(
INT(A2:A9 (INT(A2:A9 (INT(A2:A9
A2:A9 INT(A2:A9 E2:E9>0 /1000)=1) /1000)=1) LEFT(B2:B9,2) LEFT(B2:B9,2)="GL" D2:D9 (LEFT(B2:B9,2)="GL")
/1000 /1000) /1000)=1 *D2:D9
*(E2:E9>0) *(E2:E9>0)
,1)

1.001 1 1 1 1 1 GL 1 131.00 131


1.001 1 1 0 0 0 GL 1 136.70 136.7
2.001 2 0 1 0 0 GL 1 133.15 133.15
3.001 3 0 0 0 0 GL 1 132.75 132.75
2.002 2 0 0 0 0 GM 0 133.23 0
1.002 1 1 0 0 0 GL 1 131.00 131
2.003 2 0 1 0 0 GM 0 234.00 0
3.002 3 0 1 0 0 GM 0 137.00 0

step 7 SUM((INT(A2:A9/1000)=1)*(E2:E9>0)) 1 136.7


step 8 COUNT( IF((INT(A2:A9/1000)=1)*(E2:E9>0),1) ) 1 133.15
132.75
131
step 5 LARGE((LEFT(B2:B9,2)="GL")*D2:D9
131
0
0
0

LARGE((LEFT($B$2:$B$9,2)="GL")
step 6 *$D$2:$D$9,ROW(1:1)) 136.7

136.7
LARGE((LEFT(B2:B9,2)="GL")
step 7 *D2:D9,ROW(1:3)) 133.15
132.75
filtering

inv_id product_id qty price disc


1001 GL105alGRN 2,500 131.00 1.00%
1001 GL317wdGRN 1,750 136.70 0.00%
2001 GL317alGRN 2,100 133.15 1.00% helper Filter Criteria Price range
3001 GL105alGRN 2,250 132.75 0.00% Customer dari
2002 GM105glNON 1,250 133.23 0.00% Line Produksi sampai
1002 GL105glNON 1,100 131.00 0.00% 105 Jenis Produk benda D Quantity range
2003 GM024glNON 250 234.00 1.50% Material dari
3002 GM105wdBRO 4,725 137.00 2.15% NON Warna Natural sampai

Result Table
No. helper inv_id product_id qty price disc
5 #VALUE!
6 #VALUE!
7 #VALUE!
### #VALUE!

step1 step2 step3 step4

IF(
ROW($B$2:$B$9) RIGHT($B$2:$B$9,3)=$I$9,
RIGHT($B$2:$B$9,3) RIGHT($B$2:$B$9,3) ROW($B$2:$B$9)-
=$I$9 -ROW($B$1) ROW($B$1)
)

GRN 0 1 0
GRN 0 2 0
GRN 0 3 0
GRN 0 4 0
NON 1 5 5
NON 1 6 6
NON 1 7 7
BRO 0 8 0

0
0
SMALL( 0
IF( 0
step5 RIGHT($B$2:$B$9,3)=$I$9,
ROW($B$2:$B$9)-ROW($B$1) 0
), 5
6
7

SMALL(IF(RIGHT($B$2:$B$9,3)=$I$9,
ROW($B$2:$B$9)-ROW($B$1)),
step6 ROW(1:1)) 5

You might also like