00问答网
所有问题
当前搜索:
vba语言代码大全
请帮忙编写
VBA代码
,如下图片解释
答:
Sub xxx() arr = Selection r = UBound(arr) s = r + 1 For i = r - 1 To 3 Step -1 If arr(i, 1) = arr(r, 1) And arr(i - 1, 1) = arr(r - 1, 1) And arr(i - 2, 1) = arr(r - 2, 1) Then Cells(s, 3) = y - 2 s = s - 1 y...
表格
VBA
写一段
代码
答:
楼主完全可以自行一段查找的宏 然后修改下 手机答复如下 sub aaaa()set rng=columns(1).find([d1].value)if not rng is nothing then rng.entirerow.select end if end sub
求
VBA代码
,谢谢~
答:
Sub WriteData()Dim lgRow As Long, iCol As Integer lgRow = 3 iCol = 7 Do If Cells(lgRow, 1) <> "" And Cells(lgRow, 2) <> "" And Cells(lgRow, 3) <> "" And Cells(lgRow, 4) <> "" And Cells(lgRow, 5) <> "" And Cells(lgRow, 6) <> "" Then Exit ...
vba代码
请教
答:
Dim s1 As Integer Dim s2 As Integer Dim i As Integer s1 = 0 s2 = 0 For i = 1 To 7 s1 = s1 + Excel.Application.ActiveWorkbook.Sheets("Sheet1").Cells(i, 1).Value s2 = s2 + Excel.Application.ActiveWorkbook.Sheets("Sheet1").Cells(i, 3).Value Next i Excel.Application...
vba代码
翻译,越详细越好
答:
Private Sub Worksheet_Activate() 当激活工作表时执行 Application.ScreenUpdating = False 软件的窗口停止刷新 ActiveSheet.PivotTables("透视表").PivotCache.Refresh 刷新透视表的数据 ActiveSheet.PivotTables("透视表").PivotSelect "", xlDataAndLabel, True 选择透视表 Selection.RowHeight = 16...
VBA
写一段
代码
谁会?
答:
Sub test()Application.ScreenUpdating = False For j = 7 To ActiveSheet.UsedRange.Columns.Count For i = 2 To ActiveSheet.UsedRange.Rows.Count If Len(Cells(i, j)) > 0 Then Cells(1, j) = Cells(i, j)Exit For End If Next i Next j Application.ScreenUpdating = True End Sub ...
vba
查找,求编写
代码
答:
函数是 =VLOOKUP(A2,,职称表!A:B,2,0)
代码
Sub 查找()For i = 2 To Range("A65536").End(xlUp).Row For n = 2 To Sheets("职称表").Range("A65536").End(xlUp).Row If Cells(i, "A") = Sheets("职称表").Cells(n, "A") Then Cells(i, "B") = Sheets("职称表")....
帮忙写一个
vba代码
答:
文档删除。按照截图写了一个,请粘贴到数据所在单元格的
代码
窗口并运行测试吧。Sub abc()Dim rngA As Range, rngB As RangeDim s [c:c].ClearContents '清除C列原有数据 For Each rngA In Range([A1], [A1].End(xlDown)) '遍历A列所有数据 For Each rngB In Range([B1], [...
vba
的计算
代码
答:
Private Sub CommandButton1_Click()Select Case ComboBox1.Text Case "+"CommandButton1.Caption = Val(TextBox1.Text) + Val(TextBox2.Text)Case "-"CommandButton1.Caption = Val(TextBox1.Text) - Val(TextBox2.Text)Case "*"CommandButton1.Caption = Val(TextBox1.Text) * Val(Text...
VBA
高手请进.帮忙解释一下
代码
答:
'这个程序是在对数据表进行操作,T 在这段
代码
中尚未使用到.'这段代码写入数据的效率太低,数据量较大时写入速度会很慢.如果能看到完整代码和数据有优化的可能,效率会非常的高.Sub BQ()Dim Myr%, x%, n%, y%, m%, o%, s%, T%, ac%, W%, ai%, P% '定义若干Integer变量 Dim Sht1...
棣栭〉
<涓婁竴椤
3
4
5
6
8
7
9
10
11
12
涓嬩竴椤
灏鹃〉
其他人还搜