View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
eadie eadie is offline
external usenet poster
 
Posts: 7
Default vba code to sort data?

Hi All,

I am an absolute newbie to excel and vba. All I want to do is copy
data which is in the following format :

A B
identifier1: Result1
identifier2: Result2
identifier3: Result3
identifier4: Result4
identifier5: Result5



identifier1: Result6
identifier2: Result7
identifier3: Result8
identifier4: Result9
identifier5: Result10

........
.........

into a new worksheet sorted to look like the following;

A B C D E
identifier1 identifier2 identifier3 identifier4
identifier5
Result1 Result2 Result3 Result4 Result5
Result6 Result7 Result8 Result9
Result10

and so on.....

i think whats causing me grief is the space of about 5 rows seperating
each 'sets' of identifiers and results.

currently i have something similar to the following;

Sub selectData()
Dim field As String
If ActiveCell.Text = "" Then
ActiveCell.Offset(0, -1).Activate
Else: ActiveCell.Offset(1, 0).Activate
End If
field = ActiveCell.Value
Worksheets("Output").Activate
End sub

ive concentrated on trying to check whether if the field is blank or
not...Im not too sure where to go next, I keep getting lost!

any ideas? much appreciated...

eadie.

any ideas?