Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Help me please with pivot script (Dave Peterson)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help me please with pivot script (Dave Peterson)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help me please with pivot script (Dave Peterson)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Help me please with pivot script (Dave Peterson)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dave Peterson...Oh no, not her again... Lynda Excel Discussion (Misc queries) 3 October 12th 08 04:07 PM
Dave Peterson joelbeveridge Excel Discussion (Misc queries) 1 August 4th 06 02:55 AM
Dave Peterson atxcomputers Excel Discussion (Misc queries) 12 September 28th 05 06:17 PM
To: Dave Peterson PBezucha[_2_] Excel Programming 2 July 14th 04 01:23 AM
thanks Dave Peterson steve Excel Programming 1 May 5th 04 03:58 AM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"