1. 数组赋值及取不重复值 By:山菊花 Private Sub CommandButton1_Click() https://club.excelhome.net/dispbbs.asp?boardid=2replyid=569457id=196095page=1skin=0Star=2 数组入门11.xls Dim xm() As String, Arr() As String, Temp() As Str...
1. 统计及取不重复值 by:oobird By:oobird Sub Macro1() Dim w w = Sheet1! Application.ConvertFormula(Sheet1.UsedRange.Address, xlA1, xlR1C1, 1) 转换公式成地址转换 Sheet1!R1C1:R14C4 With Sheet2 .UsedRange.Clear .[a1].Consolidat...
1. ADODBRecordset中取不重复值 Public Sub RunMacro() Dim lcConnectString, lcCommandText As String Dim loADODBConnection As ADODB.Connection Dim loADODBRecordset As ADODB.Recordset ActiveWorkbook.Save lcConnectionString = Driver={Micros...
1. 不打开工作薄在指定文件夹内取数 by:northwolves 对于固定格式,固定表名的工作薄的汇总,还是建议选择ADO+SQL.假如文件夹内有成百上千个表,由于不必逐个在前台打开工作薄,ADO将表现出其...
1. 多表比较(数组和Union方法) Sub macro1() by:Northwolves 2007年包装工7月份-1.xls On Error Resume Next Dim sh As Worksheet, n As Long, i As Long, j As Long, ARR Application.ScreenUpdating = False For Each sh In Sheets If...
1. Dictionary对象的成员概要 表5-2和表5-3列出了Dictionary对象的属性和方法及相应的说明。 当增加一个键/条目对时,如果该键已存在;或者删除一个键/条目对时,该关键字/条目对不存在,...
1. 运用字典对象汇总 (数组赋值) Sub yy() Dim i%, j%, m%, n%, rng, d As Object, w$, ar() 声明变量 Set d = CreateObject(Scripting.Dictionary) 创建字典对象d n = [a65536].End(xlUp).Row 判断 A列数据使用过的最后行数...
1. 有条件连续输入递增数字 (数组赋值) Private Sub CommandButton1_Click() by:Northwolves https://club.excelhome.net/dispbbs.asp?boardID=2ID=250658page=1px=0 Dim arr(1 To 65536, 1 To 1), i As Long, j As Long, n As Long, arr2 Appl...
1. 导出全部区位码字库 Sub getallquwei() 导出全部区位码字库 by: northwolves Dim i As Byte, j As Byte, k As Byte, n As Integer, arr(1 To 1000, 1 To 10) n = 1 For i = 16 To 87 For j = 1 To IIf(i = 55, 89, 94) k = k + 1 arr(n,...
1. 数据有效性,限制输入和修改 By:gvntw https://club.excelhome.net/dispbbs.asp?boardID=2ID=249448page=1px=0 Private Sub Worksheet_Change(ByVal Target As Range) 如果目标行不是B列就不执行此代码,否则如果A列单元...