|
楼主 |
发表于 2015-7-15 09:57
|
显示全部楼层
hezhiyee 发表于 2015-7-15 09:57
把表中的数据提取出来,存放在AR和AS列,请你重点给看下提取AS列的代码优化。
For ii = 4 To UBound(brr)
If Cells(4, ii) = "单位名称" Then
Cells(13, 45) = Cells(4, ii + 3)
End If
If Cells(4, ii) = "姓 名" Then
Cells(14, 45) = Cells(4, ii + 3)
End If
If Cells(4, ii) = "个人编码" Then
Cells(15, 45) = Cells(4, ii + 3)
Else
' Cells(15, 45) = Cells(4, 30)
End If
If Cells(5, ii) = "身份证号" Then
Cells(16, 45) = Cells(5, ii + 3)
End If
If Cells(5, ii) = "出生日期" Then
Cells(17, 45) = Cells(5, ii + 3)
Else
Cells(17, 45) = Cells(5, 19)
End If
If Cells(5, ii) = "性 别" Then
Cells(18, 45) = Cells(5, ii + 3)
End If
If Cells(6, ii) = "视同缴费月数" Then
Cells(19, 45) = Cells(6, ii + 3)
End If
If Cells(6, ii) = "个人身份" Then
Cells(20, 45) = Cells(6, ii + 3)
End If
If Cells(7, ii) = "参加工作时间" Then
Cells(21, 45) = Cells(7, ii + 3)
End If
If Cells(7, ii) = "欠缴月数" Then
Cells(22, 45) = Cells(7, ii + 3)
Else
' Cells(22, 45) = Cells(7, 30)
End If
Next
|
|