我也是这种情况:
Dim Brr(0 To 24)
arr = Array("合同编号", "关联合同", "关联类型", "合同名称", "合同类型", "委托单位", "资金来源", "服务类型", "合同金额", "保密性", "签约机构", "签约人", "签约日期", "开始日期", "合同到期日期", "时限", "项目负责人", "合同状态", "投标业绩", "业绩归类", "登记日期", "建设规模", "投资额", "标签", "全部")
For i = 0 To 24
ii = Range("2:2").End(xlToRight).Column + 1
Set Findcell = Range("2:2").Find("*" & arr(i) & "*", LookAt:=xlPart) '如果 是完全匹配 XLPART 改成XLWHOLE
If Not Findcell Is Nothing Then col = Findcell.Column Else Cells(2, ii).Value = arr(i): col = ii
Brr(i) = Split(Columns(col).Address(0, 0), ":")(0)
Next
|