过程中我自己也用VBA来做---VBA过程说下怎么个步骤
以下是引用hyz00001在2014-4-28 21:43:31的发言:
感谢你,成功的解决了问题,竟然是cast函数的问题。
在这个过程中我自己也用VBA来做了一个,主要用的是分裂的技术,共享出来如下:
Sub aa()
fir = [a65536].End(xlUp).Row
Range(Cells(1, 1), Cells([a65536].End(xlUp).Row, "m")).AutoFilter field:=9, Criteria1:="=*仓库调拨单据*", Operator:=xlAnd
Range(Cells(2, 1), Cells([a65536].End(xlUp).Row, "m")).SpecialCells(xlCellTypeVisible).Copy
Cells([a65536].End(xlUp).Row + 1, 1).PasteSpecial xlPasteValues
fis = [a65536].End(xlUp).Row
Range(Cells(fir + 1, "i"), Cells(fis, "i")) = "调拨入库"
Range(Cells(fir + 1, "d"), Cells(fis, "d")).TextToColumns Destination:=Cells(fir + 1, "d"), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 9), Array(2, 9), Array(3, 2)), TrailingMinusNumbers:=True
Range(Cells(2, 1), Cells(fir, "m")).SpecialCells(xlCellTypeVisible).Copy
Cells([a65536].End(xlUp).Row + 1, 1).PasteSpecial xlPasteValues
fit = [a65536].End(xlUp).Row
Range(Cells(fis + 1, "i"), Cells(fit, "i")) = "调拨出库"
Range(Cells(fis + 1, "d"), Cells(fit, "d")).TextToColumns Destination:=Cells(fis + 1, "d"), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 9), Array(3, 9)), TrailingMinusNumbers:=True
End Sub
简单问题复杂化
感谢你,成功的解决了问题,竟然是cast函数的问题。
在这个过程中我自己也用VBA来做了一个,主要用的是分裂的技术,共享出来如下:
Sub aa()
fir = [a65536].End(xlUp).Row
Range(Cells(1, 1), Cells([a65536].End(xlUp).Row, "m")).AutoFilter field:=9, Criteria1:="=*仓库调拨单据*", Operator:=xlAnd
Range(Cells(2, 1), Cells([a65536].End(xlUp).Row, "m")).SpecialCells(xlCellTypeVisible).Copy
Cells([a65536].End(xlUp).Row + 1, 1).PasteSpecial xlPasteValues
fis = [a65536].End(xlUp).Row
Range(Cells(fir + 1, "i"), Cells(fis, "i")) = "调拨入库"
Range(Cells(fir + 1, "d"), Cells(fis, "d")).TextToColumns Destination:=Cells(fir + 1, "d"), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 9), Array(2, 9), Array(3, 2)), TrailingMinusNumbers:=True
Range(Cells(2, 1), Cells(fir, "m")).SpecialCells(xlCellTypeVisible).Copy
Cells([a65536].End(xlUp).Row + 1, 1).PasteSpecial xlPasteValues
fit = [a65536].End(xlUp).Row
Range(Cells(fis + 1, "i"), Cells(fit, "i")) = "调拨出库"
Range(Cells(fis + 1, "d"), Cells(fit, "d")).TextToColumns Destination:=Cells(fis + 1, "d"), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 9), Array(3, 9)), TrailingMinusNumbers:=True
End Sub