Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this data in my spread sheet
Header- MemberID, Plan, Coverage Type, Premium Row 1 - ABC, Health, IND, $100 Row 2 - ABC, Dental, FAM, $50 Row 3 - ABC, Vision, FAM, $25 Is there a way I can combine the rows to get this: Header - MemberID, Plan, Coverage Type, Premium, Plan, Coverage Type, Premium, Plan, Coverage Type, Premium Row 1 - ABC, Health, IND, $100, Dental, FAM, $50, Vision, FAM, $25 I have multiple memebers in my spreadsheet and the data all runs vertically and I want to combine it and go horizontal. Any help is greatly appreciated! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Monday, August 6, 2012 3:53:31 PM UTC-5, (unknown) wrote:
I have this data in my spread sheet Header- MemberID, Plan, Coverage Type, Premium Row 1 - ABC, Health, IND, $100 Row 2 - ABC, Dental, FAM, $50 Row 3 - ABC, Vision, FAM, $25 Is there a way I can combine the rows to get this: Header - MemberID, Plan, Coverage Type, Premium, Plan, Coverage Type, Premium, Plan, Coverage Type, Premium Row 1 - ABC, Health, IND, $100, Dental, FAM, $50, Vision, FAM, $25 I have multiple memebers in my spreadsheet and the data all runs vertically and I want to combine it and go horizontal. Any help is greatly appreciated! Try this macro Sub putonrowsSAS() Dim i As Long Dim lc As Long For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1 lc = Cells(i, Columns.Count).End(xlToLeft).Column + 1 If Cells(i + 1, 1) = Cells(i, 1) Then Cells(i + 1, 2).Resize(, 200).Copy Cells(i, lc) Rows(i + 1).Delete End If Next i End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select and rows to another cell if one of the cells contains data | Excel Programming | |||
How to select Visible Cells range minus 2 rows (frozen panes) | Excel Programming | |||
select only used rows and only visible cells | Excel Discussion (Misc queries) | |||
Select filled cells/rows in a spreadsheet | Excel Programming | |||
How do you select two cells in different rows and columns with ou. | Excel Discussion (Misc queries) |