zoukankan      html  css  js  c++  java
  • excel不同列之间合并

    Sub test()
        startMerge Sheet4, Sheet3
        startMerge Sheet6, Sheet3
        startMerge Sheet7, Sheet3
        startMerge Sheet8, Sheet3
        MsgBox "ok!", vbInformation
    End Sub
    'write new row
    Sub setNewRow()
        Dim i%, strTmp$
        For i = 2 To Sheet3.UsedRange.Rows.Count
            Sheet3.Cells(i, 5) = "WXGA+で" & Sheet3.Cells(i, 4) & "(" & Sheet3.Cells(i, 3) & "):静的なForm"
            Sheet3.Cells(i, 6) = "WSXGA+で" & Sheet3.Cells(i, 4) & "(" & Sheet3.Cells(i, 3) & "):静的なForm"
        Next
    End Sub

    'merge objSource to objDirect
    Private Sub startMerge(objSource As Object, objDirect As Object)
        Dim i%, strTmp$
        For i = 2 To objSource.UsedRange.Rows.Count
            strTmp = getTitleByID(objSource, objDirect.Cells(i, 1).Text)
            If strTmp <> "" Then objDirect.Cells(i, 4) = strTmp
        Next
    End Sub

    'get objSheet's title
    Private Function getTitleByID(objSheet As Object, strID$) As String
        Dim i%
        For i = 1 To objSheet.UsedRange.Rows.Count
            If objSheet.Cells(i, 1).Text = strID Then
                getTitleByID = Trim(objSheet.Cells(i, 4).Text)
                Exit For
            End If
        Next
    End Function

  • 相关阅读:
    小程序导航栏文字动态修改
    小程序之页面跳转传递参数问题
    怎样像gitHub上上传文件
    js实现数组去重
    Promise 解决同步请求问题
    input 实现一次性上传文件
    layui中load具体用法
    echarts点击柱状图时触发点击事件
    js求100以内的素数
    js怎样判断一个数是质数
  • 原文地址:https://www.cnblogs.com/sysdzw/p/1939369.html
Copyright © 2011-2022 走看看