Return Seq Values Until Blank value then return different set of seq values
Solved/Closed
lorieb63
-
28 Sep 2021 à 14:14
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 30 Sep 2021 à 11:33
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 30 Sep 2021 à 11:33
Related:
- Based on the values in cells b77 b88
- Based on the values in cells b77:b81, which function can automatically return the value in cell c77? - Best answers
- Based on the values in cells b77 b81 what function can automatically return the value in cell c77 - Best answers
- Code to move rows into another sheet based on certain values ✓ - Excel Forum
- Based on the values in cells b77 b81 c77 - Excel Forum
- Based on the values in cells b77 - Excel Forum
- Looking For a Value in a Cell - Excel Forum
- Based on the values in cells b77:b81, which function can automatically return the value in cell c77? ✓ - Excel Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
30 Sep 2021 à 11:33
30 Sep 2021 à 11:33
Hi Lorieb,
When your source sheet looks like this:
and you want your destination sheet to look like this:
Then this is the code to use:
Best regards,
Trowa
When your source sheet looks like this:
and you want your destination sheet to look like this:
Then this is the code to use:
Sub RunMe()
Dim r, c As Long
r = 2
c = 1
Sheets("Sheet1").Select
Do
Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = Cells(r, c).Value
r = r + 1
If Cells(r, c).Value = vbNullString Then
r = 2
c = c + 1
End If
Loop Until Cells(r, c) = vbNullString
End Sub
Best regards,
Trowa