=IFERROR(VLOOKUP(IF(ROW(A1)<=6,"销售部","售后部"),INDIRECT("A"&(VLOOKUP(F2,{"其他",3;"业务招待费",6;"差旅费",9;"运输费",12;"促销费",15;"交通费",17},2,)+1)&":B"&(IFERROR(SMALL({3;6;9;12;15;17},MATCH(VLOOKUP(F2,{"其他",3;"业务招待费",6;"差旅费",9;"运输费",12;"促销费",15;"交通费",17},2,),{3;6;9;12;15;17},)+1),9999)-1)),2,),"")