![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 07:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com