Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Sorting Data in a column
I am trying to extract data that is in a single column to split it into 3
columns. The data is cyclic and has 3 variables, a time, a data point and a random number. These simply run abcabcabcabc down the column and i would like to get all of the a's into a column, all of the b's into another column and all of the c's into a third column. any ideas? |
#2
|
|||
|
|||
VBA?
Sub Test() Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row If iLastRow Mod 3 < 1 Then iLastRow = iLastRow - 1 If iLastRow Mod 3 < 1 Then iLastRow = iLastRow - 1 For i = iLastRow To 1 Step -3 Cells(i, "C").Value = Cells(i + 2, "A").Value Cells(i, "B").Value = Cells(i + 1, "A").Value Rows(i + 1).Resize(2).Delete Next i End Sub -- HTH Bob Phillips "BigAndy" wrote in message ... I am trying to extract data that is in a single column to split it into 3 columns. The data is cyclic and has 3 variables, a time, a data point and a random number. These simply run abcabcabcabc down the column and i would like to get all of the a's into a column, all of the b's into another column and all of the c's into a third column. any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional format based on data from another column | Excel Discussion (Misc queries) | |||
Running total w/2 columns - Excel | Excel Worksheet Functions | |||
sorting data in linked worksheets | Excel Discussion (Misc queries) | |||
Colors of columns after sorting data in the supporting table | Charts and Charting in Excel | |||
filling a forumla down a column from data across a row | Excel Worksheet Functions |