|
楼主 |
发表于 2019-8-13 10:13
|
显示全部楼层
Sub 资产负债表()
arr = Sheets("资产负债表").Range("a4:j" & [j65536].End(3).Row)
brr = Sheets("科目余额表").Range("a8:j" & Sheets("科目余额表").[j65536].End(3).Row - 9)
For i = 10 To UBound(arr)
For j = 4 To UBound(brr)
If Sheets("科目余额表").Cells(i, 2).Value = "1002\银行存款" Then
Sheets("资产负债表").Cells(4, 3).Value = Sheets("科目余额表").Cells(i, 10).Value
Else
If Sheets("科目余额表").Cells(i, 2).Value = "1122\应收账款" Then
Sheets("资产负债表").Cells(12, 3).Value = Sheets("科目余额表").Cells(i, 10).Value
Else
If Sheets("科目余额表").Cells(i, 2).Value = "1123\预付账款" Then
Sheets("资产负债表").Cells(13, 3).Value = Sheets("科目余额表").Cells(i, 10).Value
End If
End If
End If
Next j
Next i
|
|