try this

Sub test()
Dim i, j As Long
Dim s As String
j = 1
For i = 3 To Sheets(1).Range("a2").End(xlDown).Row
s = ""
k = i
Sheets(1).Range("h" & j).Value = Sheets(1).Range("a" & i).Value
Do Until Sheets(1).Range("a" & i).Value <> Sheets(1).Range("a" & i +
1).Value
s = s & "-" & Sheets(1).Range("c" & i).Value
i = i + 1
Loop
Sheets(1).Range("i" & j).Value = Sheets(1).Range("b" & k).Value & s & "-" &
Sheets(1).Range("c" & i).Value
j = j + 1
Next
End Sub




On Tue, Feb 15, 2011 at 9:16 PM, Rajasekhar Praharaju <
rajasekhar.prahar...@gmail.com> wrote:

> hi please use this simple procedure
>
>
> Excel Text to Column Command
> The Text to Column command allows you to break text in one column into
> several columns. For example, if you have LastName, FirstName in a column,
> you can break the text into two columns—one containing LastName and the
> other containing FirstName.
>
> 1. Insert as many columns to the left of the column to be split as needed.
> 2. Select the cells to be separated.
> 3. Pull down the Data menu and choose Text to Columns
> 4. Choose Delimited and click on Next
> 5. Choose the Delimiter that is used in the column, such as comma and click
> on Next
> 6. To set the column data format, click on the column and then click on the
> format desired under column data format (this is optional).  Repeat this for
> each column and click on Finish.
>
> Excel Transpose Command
> Use the transpose feature to switch data from vertical to horizontal.
>
> 1. Select the cells to switch
> 2. Click on the Copy tool
> 3. Click where you want the data to be transposed to
> 4. Pull down the Edit menu and choose Paste Special
> 5. Click on Transpose and click on OK
>
>
> Thanks,
> Raj
>
>
> On Tue, Feb 15, 2011 at 1:37 AM, Hems <coolh...@gmail.com> wrote:
>
>> Hi Guys,
>>
>> Pls check attached excel sheet.
>>
>> I have data in across 2 columns which i want move in one row through
>> macro, is it possible?
>>
>> actually the data is extracted from access database so if its poss through
>> macro then i can process in access rather trolling it through excel.
>>
>> appreciate your efforts and thanks in advance.
>>
>> --
>> Kind Regards,
>> Hems
>>
>> --
>>
>> ----------------------------------------------------------------------------------
>> 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
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link
>> http://www.facebook.com/discussexcel
>>
>
> --
>
> ----------------------------------------------------------------------------------
> 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
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com <http://akoul.blogspot.com/>
*akoul*.wordpress.com <http://akoul.wordpress.com/>
My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>


P Before printing, think about the environment.

-- 
----------------------------------------------------------------------------------
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

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to