Copying non blank cells from one sheet to another
Closed
JohnMcLaughlin
Posts
11
Registration date
Sunday April 8, 2018
Status
Member
Last seen
April 19, 2018
-
Apr 19, 2018 at 08:47 AM
JohnMcLaughlin Posts 11 Registration date Sunday April 8, 2018 Status Member Last seen April 19, 2018 - Apr 19, 2018 at 01:07 PM
JohnMcLaughlin Posts 11 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
- How to copy data from one sheet to another in excel automatically - Guide
- How to screenshot excel sheet - Guide
- Little alchemy cheat sheet - Guide
- Google sheet right to left - Guide
- Excel macro to create new sheet based on value in cells - Guide
1 reply
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
547
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