Macro is not working
Closed
Nery
-
Feb 26, 2015 at 10:29 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Mar 2, 2015 at 11:56 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Mar 2, 2015 at 11:56 AM
Related:
- Macro is not working
- Excel online macro - Guide
- Excel run macro on open - Guide
- Macro for number to words in excel - Guide
- Excel macro download - Download - Spreadsheets
- How to copy macro from one workbook to another - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Contributor
Last seen
December 27, 2022
555
Mar 2, 2015 at 11:56 AM
Mar 2, 2015 at 11:56 AM
Hi Nery,
Try the following code:
Best regards,
Trowa
Try the following code:
Sub RunMe() Dim lRow, x As Integer lRow = Range("A1").End(xlDown).Row * 2 For x = 1 To lRow Step 1 If Cells(x + 1, "A").Value = vbNullString Then Exit Sub If Cells(x, "A").Value <> Cells(x + 1, "A").Value Then Cells(x + 1, "A").EntireRow.Insert x = x + 1 End If Next x End Sub
Best regards,
Trowa