|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub 转格式()
'
' 转格式 Macro
'
'
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-1],RC[1],RC[2])"
Selection.AutoFill Destination:=Range("B2:B80")
Range("B2:B80").Select
Range("F2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Sheet2!C:C[1],2,0)"
Selection.AutoFill Destination:=Range("F2:F80")
Range("F2:F80").Select
Range("G2").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-1],RC[-2])"
Selection.AutoFill Destination:=Range("G2:G80")
Range("G2:G80").Select
Range("G1").Select
ActiveCell.FormulaR1C1 = "条形码,数量"
Columns("G:G").Select
End Sub
问题:区域怎么改成执行到空白停止自动执行下一条(B2:B80会根据表而变化)
该贴已经同步到 电脑专家俱乐部的微博 |
|