Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave
Thanks for your response, I'm sure that there is nothing wrong with your script but it won't work on my workbook. Please ignore my first 2 posts. I have now changed my mined and want to do it from the format below I have 2 Columns will this style info: Batman CAPER Batman CLOWN Batman FAIRY Robin SIDEKICK Robin PONSE Robin PETAPAN I would like a macro to output: Batman CAPER CLOWN FAIRY Robin SIDEKICK PONSE FAIRY Please note that all the data will be different but it will only be two columns. P.S. I also know that this can be done by pivot table. But unfortunatly, this is not the way I want to do it. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200601/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Reformat()
Dim iLastrow As Long Dim i As Long Dim rng As Range iLastrow = Cells(Rows.Count, "A").End(xlUp).Row For i = iLastrow To 2 Step -1 If Cells(i, "A").Value = Cells(i - 1, "A").Value Then Cells(i - 1, "C").Resize(, 200).Value = Cells(i, "B").Resize(, 200).Value If rng Is Nothing Then Set rng = Rows(i) Else Set rng = Union(rng, Rows(i)) End If End If Next i If Not rng Is Nothing Then rng.Delete End Sub -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Danny Boy via OfficeKB.com" <u15117@uwe wrote in message news:5b06d18347b22@uwe... Hi Dave Thanks for your response, I'm sure that there is nothing wrong with your script but it won't work on my workbook. Please ignore my first 2 posts. I have now changed my mined and want to do it from the format below I have 2 Columns will this style info: Batman CAPER Batman CLOWN Batman FAIRY Robin SIDEKICK Robin PONSE Robin PETAPAN I would like a macro to output: Batman CAPER CLOWN FAIRY Robin SIDEKICK PONSE FAIRY Please note that all the data will be different but it will only be two columns. P.S. I also know that this can be done by pivot table. But unfortunatly, this is not the way I want to do it. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200601/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And you have another reply at your other post.
"Danny Boy via OfficeKB.com" wrote: Hi Dave Thanks for your response, I'm sure that there is nothing wrong with your script but it won't work on my workbook. Please ignore my first 2 posts. I have now changed my mined and want to do it from the format below I have 2 Columns will this style info: Batman CAPER Batman CLOWN Batman FAIRY Robin SIDEKICK Robin PONSE Robin PETAPAN I would like a macro to output: Batman CAPER CLOWN FAIRY Robin SIDEKICK PONSE FAIRY Please note that all the data will be different but it will only be two columns. P.S. I also know that this can be done by pivot table. But unfortunatly, this is not the way I want to do it. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200601/1 -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks alot Dave and Bob
I have managed to do what I wanted -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200601/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dave Peterson...Oh no, not her again... | Excel Discussion (Misc queries) | |||
Dave Peterson | Excel Discussion (Misc queries) | |||
Dave Peterson | Excel Discussion (Misc queries) | |||
To: Dave Peterson | Excel Programming | |||
thanks Dave Peterson | Excel Programming |