Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub DoWork()
- Dim n As Long
- n = 1&
- Do While Sheet1.Cells(1, n + 1&).Value <> ""
- n = n + 1&
- Loop
- Dim row As Long, col As Long
- For row = 1 To n
- For col = 1 To n
- Sheet2.Cells(row, col).Value = Sheet1.Cells(1, row).Value + Sheet1.Cells(2, col).Value
- Next col
- Next row
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment