学习VBA,正好给财务制作一个小工具: Sub 打开人员信息表() Dim wb As Workbook, c As Integer Set wb = Workbooks.Open(, True) c = wb.Worksheets.Count If c < Then wb.Worksheets.Add after:=Worksheets(Worksheets.Count) wb.Worksheets().Select End Sub Sub 添加选中人员() Dim fw As Workshe…
Public Sub SplitData() Dim Wb As Workbook Dim Sht As Worksheet Dim NewSht As Worksheet Dim arr As Variant Dim Brr() Set Wb = Application.ThisWorkbook Set Sht = Wb.Worksheets("总") With Sht endrow = .Cells(.Cells.Rows.Count, 1).End(xlUp).Row Set R…
从已有的表创建一个新的空表 CREATE TABLE new_table LIKE old_table; 注意: create table ... like 创建的表会保留原有表的字段.索引的定义,但不会保留外键的定义. 向空表插入数据 INSERT INTO new_table SELECT * FROM old_table; 参考链接:Create table in MySQL that matches another table? - Stack Overflow…