Thread: arrays in excel
View Single Post
  #10   Report Post  
Dan
 
Posts: n/a
Default

Thank you so much, you're the best!

"Harlan Grove" wrote:

Dan wrote...
....
. . . I just forgot, i need one more IF statement
nested, how would i add another IF statement to check for anothe value

so
this is the table:

PART# PO# Store#
A1: 021-310L B1: 107893 C1: 001
A2: 021-310L B2: 108983 C2: 002
A3: 021-310L B3: 109983 C30


I'm guessing that final 'C30' should have been 'C3: 001'.

So now I need to have these results on the next page:

PART# STR# PO# PO#
A1: 021-310L B1: 001 C1: 107893 D1: 109983
A2: 021-310L B1: 002 C2: 108983 D2:

....

Expand the definition of Tbl to include the 3rd column containing store
numbers, and change the C1 formula to

C1:
=IF(COLUMNS($C1:C1)<=SUMPRODUCT((INDEX(Tbl,0,1)=$A 1)
*(INDEX(Tbl,0,3)=$B1)),OFFSET(Tbl,SMALL(IF((INDEX( Tbl,0,1)=$A1)
*(INDEX(Tbl,0,3)=$B1),ROW(Tbl)-CELL("Row",Tbl)),
COLUMNS($C1:C1)),1,1,1),"")