Rows And Columns
Closed
Siva
-
29 Jun 2015 à 06:47
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 29 Jun 2015 à 11:33
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 29 Jun 2015 à 11:33
Related:
- Rows And Columns
- How to delete rows and columns in word - Guide
- Convert multiple rows to columns in excel macro - Guide
- How to repeat rows in excel - Guide
- Excel drop down list multiple columns - Guide
- Excel columns as numbers - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
29 Jun 2015 à 11:33
29 Jun 2015 à 11:33
Hi Siva:
Not sure what a ffg problem is, but try the following code:
How to implement and run a code:
- From Excel hit Alt + F11 to open the "Microsoft Visual Basic" window.
- Go to the top menu in the newly opened window > Insert > Module.
- Paste the code in the big white field.
- You can now close this window.
- Back at Excel, hit Alt + F8 to display the available macro's.
- Double-click the macro you wish to run.
NOTE: macro's cannot be reversed using the blue arrows. Always make sure you save your file before running a code, so you can reopen your file if something unforeseen happens or you want to go back to the situation before the code was run.
Best regards,
Trowa
Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.
Not sure what a ffg problem is, but try the following code:
Sub RunMe()
Dim lRow, x As Integer
Dim cCol As Integer
lRow = Range("A1").End(xlDown).Row
For x = lRow To 2 Step -1
cCol = Cells(x, Columns.Count).End(xlToLeft).Column
Rows(x + 1).Resize(cCol - 2).Insert
Range(Cells(x, "B"), Cells(x, cCol)).Copy
Cells(x, "F").PasteSpecial Transpose:=True
Next x
Range("B2:E" & Rows.Count).Delete shift:=xlToLeft
Application.CutCopyMode = False
End Sub
How to implement and run a code:
- From Excel hit Alt + F11 to open the "Microsoft Visual Basic" window.
- Go to the top menu in the newly opened window > Insert > Module.
- Paste the code in the big white field.
- You can now close this window.
- Back at Excel, hit Alt + F8 to display the available macro's.
- Double-click the macro you wish to run.
NOTE: macro's cannot be reversed using the blue arrows. Always make sure you save your file before running a code, so you can reopen your file if something unforeseen happens or you want to go back to the situation before the code was run.
Best regards,
Trowa
Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.