jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 834
I have the following data in columns E and F.
In G via a loop I am trying to populate - I have given a few examples in the right column as to how it should look. This attempt isn't quite working.
<tbody>
</tbody>
Any help appreciated, thanks!
In G via a loop I am trying to populate - I have given a few examples in the right column as to how it should look. This attempt isn't quite working.
Code:
Sub Loop1()
Dim i As Integer
Dim j As Integer
NumberRows = Application.WorksheetFunction.CountA(Columns("E:E"))
For j = 1 To NumberRows
For i = 1 To Cells(1, 6).Value
Cells(j, 7) = (Cells(j, 5) & "&page=" & i & "&count=48")
Next
Next
End Sub
Apples | 3 | Apples &page=1&count=48 |
Pears | 2 | Apples &page=2&count=48 |
Apples | 2 | Apples &page=3&count=48 |
Grapes | 3 | Grapes &page=1&count=48 |
Apples | 1 | |
Bananas | 3 | |
Apples | 1 | |
Pears | 1 |
<tbody>
</tbody>
Any help appreciated, thanks!