If([说明] <> Cell(Row - 1,"说明"),Selcase([说明] = "高筋粉","A001",[说明] = "低筋粉","B001",[说明] = "面包粉","C001",[说明] = "蛋糕粉","D001",[说明] = "糕粉","E001",[说明] = "其他粉类","F001",[说明] = "食用糖类","G001",[说明] = "食用油","H001",[说明] = "奶油类","I001",[说明] = "添加剂","J001",[说明] = "外购半成品","K001",[说明] = "饮料类","L001",[说明] = "月饼粉","M001",[说明] = "月饼馅料","N001",[说明] = "其他馅料类","O001",[说明] = "其他原材料","P001",[说明] = "燃料及动力","Q001",[说明] = "辅助材料","R001",[说明] = "其他辅助材料","S001",[说明] = "包装袋","T001",[说明] = "包装盒","U001",[说明] = "包装膜","V001",[说明] = "包装箱","W001",[说明] = "其他包装材料","X001",[说明] = "大米","Y001",[说明] = "后勤物资","Z001",[说明] = "维修材料","①001",[说明] = "低值易耗品","②001"),If(Number(Right(Cell(Row - 1,Col),3)) <9,Concat(Left(Cell(Row - 1,Col),Len(Text(Cell(Row - 1,Col))) - 3),"00",Text(Number(Right(Cell(Row - 1,Col),3)) + 1)),If(Number(Right(Cell(Row - 1,Col),3)) < 99,Concat(Left(Cell(Row - 1,Col),Len(Text(Cell(Row - 1,Col))) - 3),"0",Text(Number(Right(Cell(Row - 1,Col),3)) + 1)),Concat(Left(Cell(Row - 1,Col),Len(Text(Cell(Row - 1,Col))) - 3),Text(Number(Right(Cell(Row - 1,Col),3))+1))))) 像这段代码如果用你的方法,代码就不知有多少了
|