Excel Macro to rearrange data- combine cells and move sheets
Closed
masayaanglibre
Posts
2
Registration date
Wednesday September 16, 2015
Status
Member
Last seen
September 16, 2015
-
Sep 16, 2015 at 04:42 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Sep 21, 2015 at 11:44 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Sep 21, 2015 at 11:44 AM
Related:
- Excel Macro to rearrange data- combine cells and move sheets
- Transfer data from one excel worksheet to another automatically - Guide
- Excel macro to create new sheet based on value in cells - Guide
- Spell number in excel without macro - Guide
- Macro excel download - Download - Spreadsheets
- Excel date format dd.mm.yyyy - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
549
Sep 21, 2015 at 11:44 AM
Sep 21, 2015 at 11:44 AM
Hi Masayaanglibre,
The code below isn't based on the position found in column N. It fills out the first 9 cells of the first row and then moves on to the second row.
See if the code does what you want it to do:
Best regards,
Trowa
The code below isn't based on the position found in column N. It fills out the first 9 cells of the first row and then moves on to the second row.
See if the code does what you want it to do:
Sub RunMe() Dim x As Integer Sheets("Sheet2").Select With Range("A1:I9") .RowHeight = 46.5 .ColumnWidth = 9.86 .WrapText = True End With x = 1 For Each cell In Range("A1:I9") x = x + 1 cell.Value = Sheets("Sheet1").Range("D" & x).Value & " " & _ Format(Sheets("Sheet1").Range("G" & x).Value, "d-mmm-yy") & " " & _ Sheets("Sheet1").Range("M" & x).Value Next cell End Sub
Best regards,
Trowa