Copying non blank cells from one sheet to another
Closed
JohnMcLaughlin
Posts
10
Registration date
Sunday April 8, 2018
Status
Member
Last seen
April 19, 2018
-
Apr 19, 2018 at 08:47 AM
JohnMcLaughlin Posts 10 Registration date Sunday April 8, 2018 Status Member Last seen April 19, 2018 - Apr 19, 2018 at 01:07 PM
JohnMcLaughlin Posts 10 Registration date Sunday April 8, 2018 Status Member Last seen April 19, 2018 - Apr 19, 2018 at 01:07 PM
Related:
- Copying non blank cells from one sheet to another
- Google sheet right to left - Guide
- Windows network commands cheat sheet - Guide
- Copy cells from one sheet to another - Guide
- Little alchemy cheat sheet - Guide
- Mark sheet in excel - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Apr 19, 2018 at 11:04 AM
Apr 19, 2018 at 11:04 AM
Hi John,
How about this code:
Best regards,
Trowa
How about this code:
Sub RunMe() Dim nRow, nCol, x As Integer nRow = 2 nCol = 3 Sheets("Sheet1").Select Do If nCol = 17 Then nRow = nRow + 1 nCol = 3 x = 0 End If If Cells(nRow, nCol).Value <> vbNullString Then Cells(nRow, nCol).Copy Sheets("Sheet2").Range("C" & Rows.Count).End(xlUp).Offset(1, 0) Else x = x + 1 End If nCol = nCol + 1 Loop Until x = 14 End Sub
Best regards,
Trowa
Apr 19, 2018 at 01:07 PM