try this code Sub dosomething() '* siti Vi / jakarta, sept 24, 2010* Dim refTbl As Range Dim DesTbl As Range Dim r As Long, i As Long, c As Long Set refTbl = Cells(1, 1).CurrentRegion Set DesTbl = refTbl(1, 1).Offset(0, refTbl.Columns.Count + 3)
For r = 2 To refTbl.Rows.Count If Not refTbl(r, 1) = refTbl(r - 1, 1) Then c = c + 1 i = 0 DesTbl(1, c) = refTbl(1, 1) DesTbl(2, c) = refTbl(r, 1) DesTbl(3, c) = refTbl(r, 2) Else i = i + 1 DesTbl(3 + i, c) = refTbl(r, 2) End If Next r End Sub On Wed, Sep 22, 2010 at 6:04 PM, Deepak Rawat <deepakexce...@gmail.com> wrote: > > Dear All > > Pls find the attached file and do the needful > I have data in two columns and has to split it, in what form i have mention inside the file > > Regards, > Deepak -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe
ctv_Change in transpose form.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12