Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
BigAndy
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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
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
Conditional format based on data from another column Ellie Excel Discussion (Misc queries) 3 May 14th 08 05:23 PM
Running total w/2 columns - Excel Anna / Ideal Excel Worksheet Functions 14 August 10th 05 04:28 PM
sorting data in linked worksheets Allyson Excel Discussion (Misc queries) 0 June 8th 05 11:25 PM
Colors of columns after sorting data in the supporting table Booger_Boy Charts and Charting in Excel 6 January 24th 05 02:41 PM
filling a forumla down a column from data across a row Doug Excel Worksheet Functions 2 December 9th 04 08:55 PM


All times are GMT +1. The time now is 10:26 PM.

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"