Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Modifying data
Hello,
I have a simple spreadsheet with 2000 vendors names in the first column A and address ect data in columns B - K. How can I get the data to reformat to have column A list the vendor name in Cell A1 and all the other info be presnet in B1-10 and then continue for all 2000 vendor names. I've torn my hair out over this....I'm sure it's simple but I haven't had any luck at all... Any thoughts appreciated. Thank You, Extreem |
#2
|
|||
|
|||
Modifying data
Are you trying to make mailing labels? If so you are much better off
keeping your data in its current format and using it as a data source in a MS Word mail merge. If you really want to change the data this macro might help. SAVE before trying this: Sub MoveData() Dim i As Long Dim j As Integer On Error GoTo ErrorHandler Application.ScreenUpdating = False For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1 For j = 1 To 10 Cells(i + j, 1).EntireRow.Insert Cells(i + j, 1).Value = Cells(i, j + 1).Value Next j Range(Cells(i, 2), Cells(i, 11)).ClearContents Next i ErrorHandler: Application.ScreenUpdating = True End Sub Hope this helps Rowan Extreem wrote: Hello, I have a simple spreadsheet with 2000 vendors names in the first column A and address ect data in columns B - K. How can I get the data to reformat to have column A list the vendor name in Cell A1 and all the other info be presnet in B1-10 and then continue for all 2000 vendor names. I've torn my hair out over this....I'm sure it's simple but I haven't had any luck at all... Any thoughts appreciated. Thank You, Extreem |
#3
|
|||
|
|||
Modifying data
Thank You ! The code worked exactly as I had hoped.....
Extreem "Rowan Drummond" wrote: Are you trying to make mailing labels? If so you are much better off keeping your data in its current format and using it as a data source in a MS Word mail merge. If you really want to change the data this macro might help. SAVE before trying this: Sub MoveData() Dim i As Long Dim j As Integer On Error GoTo ErrorHandler Application.ScreenUpdating = False For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1 For j = 1 To 10 Cells(i + j, 1).EntireRow.Insert Cells(i + j, 1).Value = Cells(i, j + 1).Value Next j Range(Cells(i, 2), Cells(i, 11)).ClearContents Next i ErrorHandler: Application.ScreenUpdating = True End Sub Hope this helps Rowan Extreem wrote: Hello, I have a simple spreadsheet with 2000 vendors names in the first column A and address ect data in columns B - K. How can I get the data to reformat to have column A list the vendor name in Cell A1 and all the other info be presnet in B1-10 and then continue for all 2000 vendor names. I've torn my hair out over this....I'm sure it's simple but I haven't had any luck at all... Any thoughts appreciated. Thank You, Extreem |
#4
|
|||
|
|||
Modifying data
You're welcome.
Extreem wrote: Thank You ! The code worked exactly as I had hoped..... Extreem |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop Insert Row modifying formula data | Excel Discussion (Misc queries) | |||
Inserting Filtered RC cell information into other worksheets | Excel Discussion (Misc queries) | |||
Pull Current Month's Data Out of List - Repost | Excel Discussion (Misc queries) | |||
Line Graph Data Recognition | Charts and Charting in Excel | |||
Running Data Table using an input that triggers DDE linked data | Excel Discussion (Misc queries) |