|
本帖最后由 zjdh 于 2011-8-17 21:40 编辑
我没注意,你的数据表A列是空白的修改一下:
Sub 录入数据()
Application.ScreenUpdating = False '关闭屏幕刷新
With Sheets("录入表")
If .Cells(2, 2) = "" Then
.Cells(3, 2) = "空白表不能调用"
Else
辅助到流水
Set SJB = Sheets("数据表")
Set XJL = Sheets("现金流水")
x = SJB.Range("B65536").End(3).Row + 1
For i = 2 To 15
SJB.Cells(x, i) = .Cells(2, i) '记帐日期
Next
SJB.Cells(x, 49) = .Cells(2, 16) '科目调整日期
For i = 16 To 28
SJB.Cells(x, i) = .Cells(4, i - 13) '收回金额
Next
SJB.Cells(x, 88) = .Cells(4, 16) '客户经理
For i = 29 To 38
SJB.Cells(x, i) = .Cells(6, i - 23) '起息日期
Next
SJB.Cells(x, 89) = .Cells(6, 16) '信用等级
For i = 39 To 48
SJB.Cells(x, i) = .Cells(8, i - 33) '利息
Next
SJB.Cells(x, 90) = .Cells(8, 16) ' 授信金额
For i = 50 To 55
SJB.Cells(x, i) = .Cells(10, i - 44) '责任人
Next
SJB.Cells(x, 87) = .Cells(10, 15) '收回信贷员
SJB.Cells(x, 91) = .Cells(10, 16) '联系电话
For i = 59 To 69
SJB.Cells(x, i) = .Cells(12, i - 53) '科目调整
Next
SJB.Cells(x, 86) = .Cells(12, 3) '展期或再融资
SJB.Cells(x, 58) = .Cells(10, 2) '综合业务帐号
SJB.Cells(x, 56) = .Cells(6, 2) '身份证
SJB.Cells(x, 57) = .Cells(8, 2) '地址
y = XJL.Range("A65536").End(xlUp).Row + 1
XJL.Cells(y, 1) = .Cells(2, 2) '借款帐号
XJL.Cells(y, 2) = .Cells(2, 3) '借款单位
XJL.Cells(y, 3) = .Cells(2, 4) '借据号码
XJL.Cells(y, 4) = .Cells(2, 17) '记帐日期
XJL.Cells(y, 5) = .Cells(4, 17) '收回金额
XJL.Cells(y, 6) = .Cells(8, 17) '利息
XJL.Cells(y, 7) = .Cells(10, 17) '收回信贷员
XJL.Cells(y, 8) = .Cells(10, 8) '贷款日期
XJL.Cells(y, 9) = .Cells(10, 9) '到期日期
XJL.Cells(y, 10) = .Cells(10, 10) '利率
End If
.Range("B2:O2,C4:O4,F6:O6,F8:O8,F10:K10,F12:O12,C11,C12,B6,B8,B10,O10,p2,p4,p6,p8,p10,p12,q2:q8") = ""
.Cells(3, 2) = "录入成功!!"
End With
起息日期74
起息日期81
Application.ScreenUpdating = True '打开屏幕刷新
End Sub
|
|