#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default group

I have two column i need to separate it as shown below

name age
a 10
a 30
b 20

answer
name age1 age2
a 10 30
b 20


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default group

Hi
please ignore my first query, actually i require something like below..

question
Name Age
a 1/1/2008
a 1/2/2008
b 1/3/2008
b 1/4/2008
c 1/5/2008
e 1/6/2008
f 1/7/2008
f 1/8/2008
f 1/9/2008
f 1/10/2008

and Answer should be like below

Name age1 age2 age3 age4
a 1/1/2008 1/2/2008
b 1/3/2008 1/4/2008
c 1/5/2008
e 1/6/2008
f 1/7/2008 1/8/2008 1/9/2008 1/10/2008







"Ranjit kurian" wrote:

I have two column i need to separate it as shown below

name age
a 10
a 30
b 20

answer
name age1 age2
a 10 30
b 20


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default group

Sub Processdata()
Dim LastRow As Long
Dim i As Long

Application.ScreenUpdating = False

With ActiveSheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = LastRow To 2 Step -1

If .Cells(i, "A").Value = .Cells(i - 1, "A").Value Then

.Cells(i, "B").Resize(, 200).Copy .Cells(i - 1, "C")
.Rows(i).Delete
End If
Next i
End With

Application.ScreenUpdating = True
End Sub

--
__________________________________
HTH

Bob

"Ranjit kurian" wrote in message
...
I have two column i need to separate it as shown below

name age
a 10
a 30
b 20

answer
name age1 age2
a 10 30
b 20




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default group

Thanks a lot

"Bob Phillips" wrote:

Sub Processdata()
Dim LastRow As Long
Dim i As Long

Application.ScreenUpdating = False

With ActiveSheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = LastRow To 2 Step -1

If .Cells(i, "A").Value = .Cells(i - 1, "A").Value Then

.Cells(i, "B").Resize(, 200).Copy .Cells(i - 1, "C")
.Rows(i).Delete
End If
Next i
End With

Application.ScreenUpdating = True
End Sub

--
__________________________________
HTH

Bob

"Ranjit kurian" wrote in message
...
I have two column i need to separate it as shown below

name age
a 10
a 30
b 20

answer
name age1 age2
a 10 30
b 20





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
Copy Data from One Group of Cells to Another Group Alan Auerbach Charts and Charting in Excel 2 May 27th 07 04:12 PM
I wish to group my worksheets under group tabs CSI Excel Worksheet Functions 5 October 19th 06 09:25 PM
How can I convert a group of numbers to a group of letters? CarlG Excel Worksheet Functions 9 August 18th 06 03:31 PM
Taking age group Ie ages 20-29 and picking out net sales for group viabello Excel Worksheet Functions 1 April 25th 06 04:19 AM
How do I group worksheets (Lotus 123 function is "Sheet>Group Shee jaking Excel Worksheet Functions 2 August 30th 05 02:09 PM


All times are GMT +1. The time now is 06:45 AM.

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

About Us

"It's about Microsoft Excel"