一段代码谁知道什么意思

编程入门 行业动态 更新时间:2024-10-25 04:19:22

一段代码<a href=https://www.elefans.com/category/jswz/34/1768678.html style=谁知道什么意思"/>

一段代码谁知道什么意思

Sub check_output()
Dim row As Integer, c As IntegerDim arr(1 To 100), arr1(1 To 100)Dim regDim wb As WorkbookIf Range(“c1”) <> “使用” Then MsgBox “未使用!” Exit SubEnd Ifrow = Range(“A1”).CurrentRegion.Rows.Countreg = Range(“A1”).CurrentRegionFor i = LBound(reg) + 2 To UBound(reg) For j = 2 To UBound(reg, 2) If reg(i, j) <> “” Then If Len(reg(i, j)) <> 4 Then MsgBox GetColName(j) & i & “内容长度不4!” Exit Sub End If End If NextNextFor i = LBound(reg) + 2 To UBound(reg) rn = 0 mzchongfu = “” rn = Application.WorksheetFunction.CountIfs(Range(Cells(i, “b”), Cells(row, “b”)), Cells(i, “b”)) If rn > 1 Then mzchongfu = “B” & i For ii = i + 1 To UBound(reg) If reg(ii, 2) = Cells(i, “b”) Then mzchongfu = mzchongfu & “/” & “B” & ii End If Next MsgBox mzchongfu & “内容重复!” Exit Sub End If For j = 3 To UBound(reg, 2) cn = 0 ywchongfu = “” cn = Application.WorksheetFunction.CountIfs(Range(Cells(i, “c”), Cells(i, UBound(reg, 2))), reg(i, j)) If cn > 1 Then ywchongfu = GetColName(j) & i For jj = j + 1 To UBound(reg, 2) If reg(i, jj) = reg(i, j) Then ywchongfu = ywchongfu & “/” & GetColName(jj) & i End If Next MsgBox ywchongfu & “内容重复!” Exit Sub End If NextNextApplication.ScreenUpdating = FalseSet wb = Workbooks.Addt = 1For i = LBound(reg) + 2 To UBound(reg) For j = 3 To UBound(reg, 2) If reg(i, j) <> “” Then wb.Sheets(1).Cells(t, “a”) = “#thisis 行(” & i & “)列(” & GetColName(j) & “)” wb.Sheets(1).Cells(t + 1, “a”) = reg(1, 5) & " " & reg(i, 2) & reg(i, j) & “=” & reg(1, 7) wb.Sheets(1).Cells(t + 2, “a”) = reg(1, 5) & " " & reg(i, 2) & reg(i, j) t = t + 4 End If NextNextwb.SaveAs ThisWorkbook.Path & “\结果” & Format(Now, “yyyymmddhhmmss”) & “.txt”, FileFormat:=xlText, CreateBackup:=Falsewb.Close FalseApplication.ScreenUpdating = True End SubFunction GetColName(ByVal y As Integer) As StringDim z As IntegerDim i As IntegerDim n(25) As StringFor i = 0 To 25 n(i) = Chr(65 + i)NextIf y <= 26 Then GetColName = n(y - 1) Exit FunctionEnd Ifz = y \ 26If y Mod 26 = 0 Then GetColName = n(z - 2)Else GetColName = n(z - 1)End Ifz = y Mod 26If z > 0 Then GetColName = GetColName & n(z - 1)Else GetColName = GetColName & "Z"End If End Function
outlook2016,SAP Logon Pad,WinSCP,WinMerge,powershell,SQL Server Management Studio,JP1/Automactic Job Management System 3-View,Chrome,Gitlab,INTARFRM, リモートデスクトップ接続
DOTシステム

更多推荐

一段代码谁知道什么意思

本文发布于:2024-02-11 19:18:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1682878.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:谁知道   什么意思   代码

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!