附图显示,单元格F52显示数字6,其从1到200变化,单元格N77显示值1663 RS。,随着数字变化,1到200比特币也变化。我需要将列表中的个人账单金额分为200行和2列。
示例:
1 200
2 600
3 ..
4 ..
5 ..
6 1663
7 ..
etc
请帮我宏代码,我是宏新手。
答案 0 :(得分:0)
您的问题非常模糊,但如果我理解正确,那么只要您在下面的案例中添加另一张工作表就可以使用以下内容:#34;结果":
Sub foo()
Dim ws As Worksheet: Set ws = Sheets("Sheet1") 'The sheet where you have to enter your data
Dim ws2 As Worksheet: Set ws2 = Sheets("Result") 'The sheet where the results will go
For i = 1 To 200
ws.Range("F52").Value = i 'change the value of F52 from 1 to 200 in a loop
ws2.Cells(i, 1).Value = i 'write the value in the sheet Result
ws2.Cells(i, 2).Value = ws.Range("N77") 'get the calculated value from N77
Next i
End Sub