精华内容
下载资源
问答
  • let one = []; let two = []; let AllMes = []; this.pileInformation.forEach( (item, index) => { if(index%2){ two.push(item) } else { one.push(item) } }) one.forEach( (item, index)... this.$se..
     let one = [];
     let two = [];
     let AllMes = [];
     this.pileInformation.forEach( (item, index) => {
      if(index%2){
        two.push(item)
      } else {
        one.push(item)
      }
    })
     one.forEach( (item, index) => {
       AllMes.push([item,two[index]])
     })
     this.$set(this,'AllDate',AllMes)

    展开全文
  • Sub ttt() t = Timer Application.DisplayAlerts = False '清空数据 Sheets("买卖4").Select Range("B2:K15").Select Selection.ClearContents Sheets("买卖M").Select ...Selection.Cl...
    Sub ttt()
    t = Timer
    Application.DisplayAlerts = False
    '清空数据
    Sheets("买卖4").Select
    Range("B2:K15").Select
    Selection.ClearContents
    Sheets("买卖M").Select
    Range("B2:K15").Select
    Selection.ClearContents
    Sheets("买卖M转录").Select
    Range("B2:K15").Select
    Selection.ClearContents
    Sheets("买卖总").Select
    Range("B2:K15").Select
    Selection.ClearContents
    Sheets("新4").Select
    Range("B2:K15").Select
    Selection.ClearContents
    Sheets("新M").Select
    Range("B2:K15").Select
    Selection.ClearContents
    '切换工作表运行程序
    Sheets("买卖4").Select 

    Range(
    "A1:A12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A12"), _ SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _ "东一大区,东二大区,东三区,南一大区,南二大区,南三区,南四区,南五区,西一大区,西二大区,北一大区,北二大区,直销东南区", DataOption:= _ xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:A12") .Header = xlYes .Apply End With Sheets("买卖M").Select Range("A1:A12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A12"), _ SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _ "东一大区,东二大区,东三区,南一大区,南二大区,南三区,南四区,南五区,西一大区,西二大区,北一大区,北二大区,直销东南区", DataOption:= _ xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:A12") .Header = xlYes .Apply End With Sheets("买卖M转录").Select Range("A1:A12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A12"), _ SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _ "东一大区,东二大区,东三区,南一大区,南二大区,南三区,南四区,南五区,西一大区,西二大区,北一大区,北二大区,直销东南区", DataOption:= _ xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:A12") .Header = xlYes .Apply End With Sheets("买卖总").Select Range("A1:A12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A12"), _ SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _ "东一大区,东二大区,东三区,南一大区,南二大区,南三区,南四区,南五区,西一大区,西二大区,北一大区,北二大区,直销东南区", DataOption:= _ xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:A12") .Header = xlYes .Apply End With Sheets("新4").Select Range("A1:A12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A12"), _ SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _ "东一大区,东二大区,东三区,南一大区,南二大区,南三区,南四区,南五区,西一大区,西二大区,北一大区,北二大区,直销东南区", DataOption:= _ xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:A12") .Header = xlYes .Apply End With Sheets("新M").Select Range("A1:A12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A12"), _ SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _ "东一大区,东二大区,东三区,南一大区,南二大区,南三区,南四区,南五区,西一大区,西二大区,北一大区,北二大区,直销东南区", DataOption:= _ xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:A12") .Header = xlYes .Apply End With '添加数据 Dim a1, b1, c1, d1, e1, f1, a2, b2, c2, d2, e2, f2 As Integer Sheets("买卖4").Select '买卖4 arr1 = Sheets("买卖4质").Range("A1:D14") arr2 = Sheets("买卖4转").Range("A1:I14") For i = 2 To 12 For j = 2 To 14 '买卖4质 If Cells(i, 1) = arr1(j, 1) Then '400接通量_买卖 Cells(i, 2) = arr1(j, 2) * arr1(j, 4) '400接听量_买卖 Cells(i, 3) = arr1(j, 2) * arr1(j, 4) * arr1(j, 3) '400接听率_买卖 On Error Resume Next Cells(i, 4) = Cells(i, 3) / Cells(i, 2) End If '买卖4转 If Cells(i, 1) = arr2(j, 1) Then '400商机量_买卖 Cells(i, 5) = arr2(j, 2) '400转录入量 Cells(i, 6) = arr2(j, 7) '400转录入率 Cells(i, 7) = arr2(j, 3) '400转带看量 Cells(i, 8) = arr2(j, 8) '400转带看率 Cells(i, 9) = arr2(j, 4) '400转成交量 Cells(i, 10) = arr2(j, 9) '400转成交率 Cells(i, 11) = arr2(j, 5) End If Next Next For i = 2 To 12 '东南大部 If i < 9 Then a2 = a2 + Cells(i, 2) b2 = b2 + Cells(i, 3) c2 = c2 + Cells(i, 5) d2 = d2 + Cells(i, 6) e2 = e2 + Cells(i, 8) f2 = f2 + Cells(i, 10) End If '接通量 Cells(13, 2) = a2 '接听量 Cells(13, 3) = b2 '接听率 Cells(13, 4) = b2 / a2 '400商机量 Cells(13, 5) = c2 '转录入量 Cells(13, 6) = d2 '转录入率 Cells(13, 7) = d2 / c2 '转带看量 Cells(13, 8) = e2 '转带看率 Cells(13, 9) = e2 / c2 '转成交量 Cells(13, 10) = f2 '转成交率 Cells(13, 11) = f2 / c2 '西北大部 If i > 8 Then a1 = a1 + Cells(i, 2) b1 = b1 + Cells(i, 3) c1 = c1 + Cells(i, 5) d1 = d1 + Cells(i, 6) e1 = e1 + Cells(i, 8) f1 = f1 + Cells(i, 10) End If '接通量 Cells(14, 2) = a1 '接听量 Cells(14, 3) = b1 '接听率 Cells(14, 4) = b1 / a1 '400商机量 Cells(14, 5) = c1 '转录入量 Cells(14, 6) = d1 '转录入率 Cells(14, 7) = d1 / c1 '转带看量 Cells(14, 8) = e1 '转带看率 Cells(14, 9) = e1 / c1 '转成交量 Cells(14, 10) = f1 '转成交率 Cells(14, 11) = f1 / c1 Next '公司 '接通量 Cells(15, 2) = a1 + a2 '接听量 Cells(15, 3) = b1 + b2 '接听率 Cells(15, 4) = (b1 + b2) / (a1 + a2) '400商机量 Cells(15, 5) = c1 + c2 '转录入量 Cells(15, 6) = d1 + d2 '转录入率 Cells(15, 7) = (d1 + d2) / (c1 + c2) '转带看量 Cells(15, 8) = e1 + e2 '转带看率 Cells(15, 9) = (e1 + e2) / (c1 + c2) '转成交量 Cells(15, 10) = f1 + f2 '转成交率 Cells(15, 11) = (f1 + f2) / (c1 + c2) a1 = 0 b1 = 0 c1 = 0 d1 = 0 e1 = 0 f1 = 0 a2 = 0 b2 = 0 c2 = 0 d2 = 0 e2 = 0 f2 = 0 '买卖M Sheets("买卖M").Select arr1 = Sheets("买卖M质").Range("A1:C14") arr2 = Sheets("买卖M转").Range("A1:I14") For i = 2 To 12 For j = 2 To 14 '买卖M质 If Cells(i, 1) = arr1(j, 1) Then 'IM会话数_买卖 Cells(i, 2) = arr1(j, 2) 'IM1分钟响应量_买卖 Cells(i, 3) = arr1(j, 2) * arr1(j, 3) 'IM1分钟响应率_买卖 Cells(i, 4) = arr1(j, 3) 'IM商机量_买卖 Cells(i, 5) = arr2(j, 2) 'IM转录入量_买卖 Cells(i, 6) = arr2(j, 7) 'IM转录入率_买卖 Cells(i, 7) = arr2(j, 3) 'IM转带看量_买卖 Cells(i, 8) = arr2(j, 8) 'IM转带看率_买卖 Cells(i, 9) = arr2(j, 4) 'IM转成交量_买卖 Cells(i, 10) = arr2(j, 9) 'IM转成交率_买卖 Cells(i, 11) = arr2(j, 5) End If Next Next For i = 2 To 12 '东南大部 If i < 9 Then a2 = a2 + Cells(i, 2) b2 = b2 + Cells(i, 3) c2 = c2 + Cells(i, 5) d2 = d2 + Cells(i, 6) e2 = e2 + Cells(i, 8) f2 = f2 + Cells(i, 10) End If 'IM会话数_买卖 Cells(13, 2) = a2 '1分钟响应量 Cells(13, 3) = b2 '1分钟响应率 Cells(13, 4) = b2 / a2 'IM商机量 Cells(13, 5) = c2 '转录入量 Cells(13, 6) = d2 '转录入率 Cells(13, 7) = d2 / c2 '转带看量 Cells(13, 8) = e2 '转带看率 Cells(13, 9) = e2 / c2 '转成交量 Cells(13, 10) = f2 '转成交率 Cells(13, 11) = f2 / c2 '西北大部 If i > 8 Then a1 = a1 + Cells(i, 2) b1 = b1 + Cells(i, 3) c1 = c1 + Cells(i, 5) d1 = d1 + Cells(i, 6) e1 = e1 + Cells(i, 8) f1 = f1 + Cells(i, 10) End If 'IM会话数 Cells(14, 2) = a1 '1分钟响应量 Cells(14, 3) = b1 '1分钟响应率 On Error Resume Next Cells(14, 4) = b1 / a1 'IM商机量 Cells(14, 5) = c1 '转录入量 Cells(14, 6) = d1 '转录入率 Cells(14, 7) = d1 / c1 '转带看量 Cells(14, 8) = e1 '转带看率 Cells(14, 9) = e1 / c1 '转成交量 Cells(14, 10) = f1 '转成交率 Cells(14, 11) = f1 / c1 Next '公司 '会话数 Cells(15, 2) = a1 + a2 '1分钟响应量 Cells(15, 3) = b1 + b2 '1分钟响应率 Cells(15, 4) = (b1 + b2) / (a1 + a2) 'IM商机量 Cells(15, 5) = c1 + c2 '转录入量 Cells(15, 6) = d1 + d2 '转录入率 Cells(15, 7) = (d1 + d2) / (c1 + c2) '转带看量 Cells(15, 8) = e1 + e2 '转带看率 Cells(15, 9) = (e1 + e2) / (c1 + c2) '转成交量 Cells(15, 10) = f1 + f2 '转成交率 Cells(15, 11) = (f1 + f2) / (c1 + c2) a1 = 0 b1 = 0 c1 = 0 d1 = 0 e1 = 0 f1 = 0 a2 = 0 b2 = 0 c2 = 0 d2 = 0 e2 = 0 f2 = 0 '买卖M转录 Sheets("买卖M转录").Select arr1 = Sheets("买卖M质").Range("A1:I14") arr2 = Sheets("买卖M转").Range("A1:I14") For i = 2 To 12 For j = 2 To 14 'IM质量 If Cells(i, 1) = arr1(j, 1) Then For k = 2 To 9 Cells(i, k) = arr1(j, k) Next End If '转录入 If Cells(i, 1) = arr2(j, 1) Then Cells(i, 10) = arr2(j, 3) End If Next Next Sheets("买卖总").Select arr = Sheets("买卖总转").Range("A1:I14") For i = 2 To 12 For j = 2 To 14 If Cells(i, 1) = arr(j, 1) Then '商机量 Cells(i, 2) = arr(j, 2) '转录入量 Cells(i, 3) = arr(j, 7) '转录入率 Cells(i, 4) = arr(j, 3) '转带看量 Cells(i, 5) = arr(j, 8) '转带看率 Cells(i, 6) = arr(j, 4) '转成交量 Cells(i, 7) = arr(j, 9) '转成交率 Cells(i, 8) = arr(j, 5) End If Next Next For i = 2 To 12 '东南大部 If i < 9 Then a2 = a2 + Cells(i, 2) b2 = b2 + Cells(i, 3) c2 = c2 + Cells(i, 5) d2 = d2 + Cells(i, 7) End If '总商机量 Cells(13, 2) = a2 '总商机转录入量 Cells(13, 3) = b2 '总商机转录入率 Cells(13, 4) = b2 / a2 '总商机转带看量 Cells(13, 5) = c2 '总商机转带看率 Cells(13, 6) = c2 / a2 '总商机转成交量 Cells(13, 7) = d2 '总商机转成交率 Cells(13, 8) = d2 / a2 '西北大部 If i > 8 Then a1 = a1 + Cells(i, 2) b1 = b1 + Cells(i, 3) c1 = c1 + Cells(i, 5) d1 = d1 + Cells(i, 7) End If '总商机量 Cells(14, 2) = a1 '总商机转录入量 Cells(14, 3) = b1 '总商机转录入率 On Error Resume Next Cells(14, 4) = b1 / a1 '总商机转带看量 Cells(14, 5) = c1 '总商机转带看率 Cells(14, 6) = c1 / a1 '总商机转成交量 Cells(14, 7) = d1 '总商机转成交率 Cells(14, 8) = d1 / a1 Next '公司 '总商机量 Cells(15, 2) = a1 + a2 '总商机转录入量 Cells(15, 3) = b1 + b2 '总商机转录入率 Cells(15, 4) = (b1 + b2) / (a1 + a2) '总商机转带看量 Cells(15, 5) = c1 + c2 '总商机转带看率 Cells(15, 6) = (c1 + c2) / (a1 + a2) '总商机转成交量 Cells(15, 7) = d1 + d2 '总商机转成交率 Cells(15, 8) = (d1 + d2) / (a1 + a2) a1 = 0 b1 = 0 c1 = 0 d1 = 0 e1 = 0 f1 = 0 a2 = 0 b2 = 0 c2 = 0 d2 = 0 e2 = 0 f2 = 0 Sheets("新4").Select '新4 arr1 = Sheets("新4质").Range("A1:D14") arr2 = Sheets("新4转").Range("A1:I14") For i = 2 To 12 For j = 2 To 14 '买卖4质 If Cells(i, 1) = arr1(j, 1) Then '400接通量_新房 Cells(i, 2) = arr1(j, 2) * arr1(j, 4) '400接听量_新房 Cells(i, 3) = arr1(j, 2) * arr1(j, 4) * arr1(j, 3) '400接听率_新房 On Error Resume Next Cells(i, 4) = Cells(i, 3) / Cells(i, 2) End If '买卖4转 If Cells(i, 1) = arr2(j, 1) Then '400商机量_新房 Cells(i, 5) = arr2(j, 2) '400转录入量 Cells(i, 6) = arr2(j, 7) '400转录入率 Cells(i, 7) = arr2(j, 3) '400转带看量 Cells(i, 8) = arr2(j, 8) '400转带看率 Cells(i, 9) = arr2(j, 4) '400转成交量 Cells(i, 10) = arr2(j, 9) '400转成交率 Cells(i, 11) = arr2(j, 5) End If Next Next For i = 2 To 12 '东南大部 If i < 9 Then a2 = a2 + Cells(i, 2) b2 = b2 + Cells(i, 3) c2 = c2 + Cells(i, 5) d2 = d2 + Cells(i, 6) e2 = e2 + Cells(i, 8) f2 = f2 + Cells(i, 10) End If '接通量 Cells(13, 2) = a2 '接听量 Cells(13, 3) = b2 '接听率 Cells(13, 4) = b2 / a2 '400商机量 Cells(13, 5) = c2 '转录入量 Cells(13, 6) = d2 '转录入率 Cells(13, 7) = d2 / c2 '转带看量 Cells(13, 8) = e2 '转带看率 Cells(13, 9) = e2 / c2 '转成交量 Cells(13, 10) = f2 '转成交率 Cells(13, 11) = f2 / c2 '西北大部 If i > 8 Then a1 = a1 + Cells(i, 2) b1 = b1 + Cells(i, 3) c1 = c1 + Cells(i, 5) d1 = d1 + Cells(i, 6) e1 = e1 + Cells(i, 8) f1 = f1 + Cells(i, 10) End If '接通量 Cells(14, 2) = a1 '接听量 Cells(14, 3) = b1 '接听率 Cells(14, 4) = b1 / a1 '400商机量 Cells(14, 5) = c1 '转录入量 Cells(14, 6) = d1 '转录入率 Cells(14, 7) = d1 / c1 '转带看量 Cells(14, 8) = e1 '转带看率 Cells(14, 9) = e1 / c1 '转成交量 Cells(14, 10) = f1 '转成交率 Cells(14, 11) = f1 / c1 Next '公司 '接通量 Cells(15, 2) = a1 + a2 '接听量 Cells(15, 3) = b1 + b2 '接听率 Cells(15, 4) = (b1 + b2) / (a1 + a2) '400商机量 Cells(15, 5) = c1 + c2 '转录入量 Cells(15, 6) = d1 + d2 '转录入率 Cells(15, 7) = (d1 + d2) / (c1 + c2) '转带看量 Cells(15, 8) = e1 + e2 '转带看率 Cells(15, 9) = (e1 + e2) / (c1 + c2) '转成交量 Cells(15, 10) = f1 + f2 '转成交率 Cells(15, 11) = (f1 + f2) / (c1 + c2) a1 = 0 b1 = 0 c1 = 0 d1 = 0 e1 = 0 f1 = 0 a2 = 0 b2 = 0 c2 = 0 d2 = 0 e2 = 0 f2 = 0 Sheets("新M").Select '新M arr1 = Sheets("新M质").Range("A1:C14") arr2 = Sheets("新M转").Range("A1:I14") For i = 2 To 12 For j = 2 To 14 '买卖M质 If Cells(i, 1) = arr1(j, 1) Then 'IM会话数_新房 Cells(i, 2) = arr1(j, 2) 'IM1分钟响应量_新房 Cells(i, 3) = arr1(j, 2) * arr1(j, 3) 'IM1分钟响应率_新房 Cells(i, 4) = arr1(j, 3) 'IM商机量_新房 Cells(i, 5) = arr2(j, 2) 'IM转录入量_新房 Cells(i, 6) = arr2(j, 7) 'IM转录入率_新房 Cells(i, 7) = arr2(j, 3) 'IM转带看量_新房 Cells(i, 8) = arr2(j, 8) 'IM转带看率_新房 Cells(i, 9) = arr2(j, 4) 'IM转成交量_新房 Cells(i, 10) = arr2(j, 9) 'IM转成交率_新房 Cells(i, 11) = arr2(j, 5) End If Next Next For i = 2 To 12 '东南大部 If i < 9 Then a2 = a2 + Cells(i, 2) b2 = b2 + Cells(i, 3) c2 = c2 + Cells(i, 5) d2 = d2 + Cells(i, 6) e2 = e2 + Cells(i, 8) f2 = f2 + Cells(i, 10) End If 'IM会话数_买卖 Cells(13, 2) = a2 '1分钟响应量 Cells(13, 3) = b2 '1分钟响应率 Cells(13, 4) = b2 / a2 'IM商机量 Cells(13, 5) = c2 '转录入量 Cells(13, 6) = d2 '转录入率 Cells(13, 7) = d2 / c2 '转带看量 Cells(13, 8) = e2 '转带看率 Cells(13, 9) = e2 / c2 '转成交量 Cells(13, 10) = f2 '转成交率 Cells(13, 11) = f2 / c2 '西北大部 If i > 8 Then a1 = a1 + Cells(i, 2) b1 = b1 + Cells(i, 3) c1 = c1 + Cells(i, 5) d1 = d1 + Cells(i, 6) e1 = e1 + Cells(i, 8) f1 = f1 + Cells(i, 10) End If 'IM会话数 Cells(14, 2) = a1 '1分钟响应量 Cells(14, 3) = b1 '1分钟响应率 On Error Resume Next Cells(14, 4) = b1 / a1 'IM商机量 Cells(14, 5) = c1 '转录入量 Cells(14, 6) = d1 '转录入率 Cells(14, 7) = d1 / c1 '转带看量 Cells(14, 8) = e1 '转带看率 Cells(14, 9) = e1 / c1 '转成交量 Cells(14, 10) = f1 '转成交率 Cells(14, 11) = f1 / c1 Next '公司 '会话数 Cells(15, 2) = a1 + a2 '1分钟响应量 Cells(15, 3) = b1 + b2 '1分钟响应率 Cells(15, 4) = (b1 + b2) / (a1 + a2) 'IM商机量 Cells(15, 5) = c1 + c2 '转录入量 Cells(15, 6) = d1 + d2 '转录入率 Cells(15, 7) = (d1 + d2) / (c1 + c2) '转带看量 Cells(15, 8) = e1 + e2 '转带看率 Cells(15, 9) = (e1 + e2) / (c1 + c2) '转成交量 Cells(15, 10) = f1 + f2 '转成交率 Cells(15, 11) = (f1 + f2) / (c1 + c2) a1 = 0 b1 = 0 c1 = 0 d1 = 0 e1 = 0 f1 = 0 a2 = 0 b2 = 0 c2 = 0 d2 = 0 e2 = 0 f2 = 0 '格式 Sheets("买卖4").Select '转带看率排序 Range("A1:K12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("I2:I12") _ , SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:K12") .Apply End With '400接听率率条件格式 Range("d2:d12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转录入率条件格式 Range("g2:g12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转带看率条件格式 Range("i2:i12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转成交率条件格式 Range("k2:k12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Sheets("买卖M").Select '转带看率排序 Range("A1:K12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("I2:I12"), _ SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:K12") .Apply End With 'IM1分钟响应率条件格式 Range("d2:d12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM1转录入率条件格式 Range("g2:g12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM1转带看率条件格式 Range("i2:i12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM1转成交率条件格式 Range("k2:k12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Sheets("买卖M转录").Select '3日内复聊率 Range("A1:K12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("I2:I12") _ , SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:K12") .Apply End With Range("H2:H12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Range("I2:I12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Range("J2:J12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Sheets("买卖总").Select '转带看率排序 Range("A1:H12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("F2:F12"), _ SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:H12") .Apply End With '转录入率条件格式 Range("D2:D12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM1转带看率条件格式 Range("F2:F12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转成交率条件格式 Range("H2:H12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Sheets("新4").Select '转带看率排序 Range("A1:K12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("I2:I12") _ , SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:K12") .Apply End With '400接听率率条件格式 Range("d2:d12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转录入率条件格式 Range("g2:g12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转带看率条件格式 Range("i2:i12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With '转成交率条件格式 Range("k2:k12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Sheets("新M").Select Range("A1:K12").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add2 Key:=Range("D2:D12"), _ SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:K12") .Apply End With 'IM响应率_新房条件格式 Range("D2:D12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM加私率_新房条件格式 Range("G2:G12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM转带看率_新房条件格式 Range("i2:i12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With 'IM转成交率_新房条件格式 Range("k2:k12").Select Selection.FormatConditions.AddColorScale ColorScaleType:=3 Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _ xlConditionValueLowestValue With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor .Color = 7039480 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _ xlConditionValuePercentile Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50 With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor .Color = 8711167 .TintAndShade = 0 End With Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _ xlConditionValueHighestValue With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor .Color = 8109667 .TintAndShade = 0 End With Application.DisplayAlerts = True MsgBox Timer - t End Sub

     

    转载于:https://www.cnblogs.com/pingzizhuanshu/p/11219731.html

    展开全文
  • 1 数组嵌套的知识 1维数组的嵌套并非2维数组 二维数组的嵌套并非三维数组 2 数组的嵌套写法 1维数组的嵌套:arr(m)(i) 2维数组的嵌套:arr(m)(i,j) Sub test1001() Debug.Print "测试一维数组和其嵌套" '一...

    1 数组嵌套的知识

    • 1维数组的嵌套并非2维数组
    • 二维数组的嵌套并非三维数组

     

    2 数组的嵌套写法

    • 1维数组的嵌套:arr(m)(i)
    • 2维数组的嵌套:arr(m)(i,j)
    Sub test1001()
    
    
    Debug.Print "测试一维数组和其嵌套"
    '一维数组
    arr1 = Array(1, 3, 5, 7, 9)
    arr2 = Array(2, 4, 6, 8, 10)
    
    
    '一维数组的嵌套
    arr3 = Array(arr1, arr2)
    'Debug.Print arr3(1, 1)    '证明了一维数组的嵌套,只是嵌套类型,不是2维数组
    Debug.Print arr3(1)(1)
    
    Debug.Print
    
    
    Debug.Print "测试二维数组和其嵌套"
    
    Dim arr51()
    ReDim arr51(3, 3)
    '2维数组
    For I = 1 To 3
       For J = 1 To 3
          arr51(I, J) = 2 * I * J
          Debug.Print arr51(I, J);
       Next
       Debug.Print
    Next
    Debug.Print
    
    
    Debug.Print arr51(1, 1)
    Debug.Print
    
    
    Dim arr52()
    ReDim arr52(4, 4)
    '2维数组
    For I = 1 To 4
       For J = 1 To 4
          arr52(I, J) = 3 * I * J
          Debug.Print arr52(I, J);
       Next
       Debug.Print
    Next
    Debug.Print
    
    
    Debug.Print arr52(1, 1)
    Debug.Print
    
    '2维数组的嵌套
    arr53 = Array(arr51, arr52)
    Debug.Print arr53(1)(1, 1)       '二维数组的嵌套,也不需要2个数组行列相同
    Debug.Print
    
    
    
    Debug.Print "测试二维数组和其嵌套,第2种办法,[{}] 这种写法必须index从1开始"
    '2维数组
    'arr11 = [{1,3,5};{5,7,9}]
    'arr12 = [{2,4,6};{6,8,10}]
    arr11 = [{1,3,5;5,7,9}]
    arr12 = [{2,4,6;6,8,10}]
    Debug.Print arr11(1, 1)
    
    
    
    '2维数组的嵌套
    arr13 = Array(arr11, arr12)
    Debug.Print arr13(1)(1, 1)
    
    
    
    
    Debug.Print "测试二维数组和其嵌套,第3种办法---[{,,, ; ,,,}]只有一种写法  []其他写法不是数组"
    '2维数组
    'arr21 = [{1,3,5};{5,7,9}]
    'arr22 = [{2,4,6};{6,8,10}]
    arr21 = [{1,3,5},{5,7,9}]
    arr22 = [{2,4,6},{6,8,10}]
    
    
    End Sub

     

     

     

     

     

    其实我这上面的例子不算嵌套数组,而是组合数组

    下面这张才是嵌套数组

    嵌套数组还可以  transpose 为二维数组

     

    http://club.excelhome.net/thread-640048-1-1.html

    展开全文
  • //定义两个数组 $first 和 $second $first = array( array( "uid"=>'1', "name"=>'wang', ), array( "uid"=>2, "name"=>'zhang', ), array( "uid"=>3,
    //定义两个数组 $first 和  $second
    $first = array(
        array(
            "uid"=>'1',
            "name"=>'wang',
        ),
        array(
            "uid"=>2,
            "name"=>'zhang',
        ),
        array(
            "uid"=>3,
            "name"=>'li',
        )
    );
    $second=array(
        array(
            "uid"=>'1',
            "age"=>18,
        ),
        array(
            "uid"=>2,
            "age"=>20,
        ),
        array(
            "uid"=>3,
            "age"=>19,
        )
    );
    $arr = array();
    foreach($first as $k=>$v){
        $arr[] = array_merge($v,$second[$k]);
    }
    print_r($arr);
    array_merge()  是php数组合并函数 把两个二维数组下的一维数组合并成成一个一维数组,在赋值到$arr中。
    展开全文
  • 大家好,今日继续讲VBA数组与字典解决方案的第27讲,内容是两列数据中相互去掉重复值之后将数据合并。这讲的内容利用到动态数组,固定数组数组合并数组的转置等等。还是先看实例,下面的工作表中A列和B列有两列...
  • 今天和大家要说的是VBA数组的应用,上篇文章我们说的是数组的基础知识点,有不明白的小伙伴可以点击链接进行知识点回顾Excel VBA 数组基础知识,初学者不可不学的关键知识,今天主要说说数组的几操作方法,这是...
  • 大家好,今日继续讲VBA数组与字典解决方案的第27讲,内容是两列数据中相互去掉重复值之后将数据合并。这讲的内容利用到动态数组,固定数组数组合并数组的转置等等。还是先看实例,下面的工作表中A列和B列有两列...
  • 本章主要内容:认识数组数组应用案例,小结。
  • VBA数组完全教程

    万次阅读 多人点赞 2017-06-25 11:45:15
    兰色幻想VBA数组入门教程10集 1. 前言:不要把VBA数组想的太神秘,它其实就是一组数字而已。... Dim arr(1 To 10, 1 To 3) '创建一可以容下10行3列的数组空间 For x = 1 To 4 For y = 1 To 3 ar
  • VBA-字典与数组实现去重

    千次阅读 2020-12-05 19:14:35
    在实际操作中有太的数据需要去重仅保留一条记录,在这里自己写了两个函数...'合并去重,将数据源1和数据源2合并去重保存在数组里,arr0是用来指定去重列和保留列,使用时仅限在两个数组结构一致的情况下使用。 Funct
  • 来自《别怕excel vba其实很简单》 Sub 宏1() ' ' 宏1 宏 Dim bt As Range, r As Long, c As Long r = 1 c = 7 Dim wt As Worksheet Set wt = ThisWorkbook.Worksheets(1) wt.Rows(r + 1 &am...
  • 一种使用VBA数组去重的思路

    千次阅读 2020-02-13 23:41:53
    一种使用VBA数组去重的思路 下面这表是要去重的部分数据,这次我需要做的是 把数据中的日期提取出来去重 日后计算需要用到 为了能够达到去重的目的,首先要先把日期提取出来,如果只是为了提取日期,那么可以使用...
  • Hello,大家好,在前面我们说过Excel函数中间的数组含义,那么你是否知道VBA中间的两数据处理利器字典+数组呢?他们一旦结合起来将会发挥无可估量的作用,提升执行效率就在分秒之间。今天我们先说说数组,在下期...
  • 巧用公式实现VBA数组快速赋值

    千次阅读 2020-07-03 06:44:53
    这个该如何弄到一个数组中呢,先分别读入数组,然后再使用动态数组就和合并成2x3的数组了。有些不甘心,这么简单的一个事情,要这么多行代码。千万不要忘记,我们是在用Excel中玩儿VBA,Excel中强大的公式可以把这个...
  • 将数据源的两列数据对应成两个数组,分别读入到数组中,再使用输入单元格的数值和数组数值对比,如果相等,则返回第二个数组的对应值。 Sub test2() '合并,速度更快 Dim i '用于数组的索引,如果数据量很大,用int...
  • 今天和大家要说的是VBA数组的应用,上篇文章我们说的是数组的基础知识点,有不明白的小伙伴可以点击链接进行知识点回顾,今天主要说说数组的几操作方法,这是我们以后会经常遇到的,也是经常会使用的方法。...
  • 由于该数据将原本的四列信息合并至一单元格中,现希望利用数组对该数据进行分列,将其分为四列。 关键词;关注指数;升降幅度;升降位次 小胸钢托聚拢游泳衣;12;9%;13位 泳衣 女 三件套;32;13%;12位 泳衣 四...
  • 关键点1:双循环的目的是,循环拿1个数组,和另外一个循环的所有数做对比 关键点2:在外层赋值 关键点3:赋值的计数变量得独立,因为不知道有几个非重复数 Sub test_arr1() Dim arr2 arr1 = Array(1, 2, ...
  • 多个工作簿,且每个工作簿中的工作表个数不定,字段不定,最终以指定字段生成一个新的工作簿。主要应用了数组和条件控制等。
  • 2、excel表格保留一行标题行,并把第一列数据填写为拆分项(文件拆分时将按第一列的内容进行归类合并为一文件),整个表格不要合并单元格; 3、在打开的EXCEL工作表名称上点右键选择查看代码; 4、选择菜单栏:...
  • Excel VBA数组入门教程 1. 前言:不要把VBA数组想的...Sub 数组示例() Dim x As Long, y As Long Dim arr(1 To 10, 1 To 3) '创建一可以容下10行3列的数组空间 For x = 1 To 4 For y = 1 To 3 arr(x, y) =...
  • Sub Test()  With Sheet1  '准备阶段  .Range("C:C").Clear '清除C列中... Dim k() As Integer '定义一整型数组k(),用于存放获取到的数据  Dim ks As Integer '定义一整型ks,作为整型数组k()的序列号  
  • 每天一篇Excel技术图文微信公众号:Excel星球NO.XXX-...——所以就做了这样一整理。非常认真的说,VIP学员的学习资料是非常全面的,基本覆盖了Excel的方方面面。从常用技巧、入门教程、透视表、函数、图表到Pow...
  • 创建数组 var mycars = new Array(); mycars[0] = "Saab"; mycars[1] = "Volvo"; mycars[2] = "BMW";...数组属性 ... 返回创建数组对象的原型函数。... 设置或返回数组元素的个数... 连接两或更数组,并返回结果。
  • 在网上找EXCEL文件合并的方法,思路: 一、Linux 或者window+cmder,直接用命令行cat合并EXCEL文件,但是,需要安装辅助东西才能直接处理(也许也不可以,但是,可以用文件格式转换工具转换是可行的,把EXCEL文件...
  • 条件查询并返回列数据,是在数据查询时经常会使用的功能,利用字典与数组结合,能够高效地实现此功能。数据源图如下。 现需要根据款号,编号两条件,查询工艺、数量、报价信息,示例代码如下。 Function ...
  • 你已选中了添加链接的内容蓝字关注,加微信NZ9668获资料信息VBA解决方案 系列丛书作者头条百家...和八戒相比,大师兄的本例最为称道的是拔撮毫毛吹口气,瞬间会产生多个大师兄。类是对象产生的模板,如何在类模块中...
  • 多文件合并1 多文件合并2 小结 概念 对象赋值到变量(Set) 原数据 目标:新建多个表 代码 效果图 认识Dir函数 判断数据是否存在 原数据 目标:判断新疆.xlsx是否存在 代码 效果图 不存在返回一个空值 目标:判断...
  • 现有如下一二维数组,需要根据一些要求完成相关操作 $a = array( array('id'=&amp;amp;gt;1,'name'=&amp;amp;gt;'tom','age'=&amp;amp;gt;21), array('id'=&amp;amp;gt;2,'name'=&amp;...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 919
精华内容 367
关键字:

vba多个数组合并

友情链接: OAUS源码.rar