View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mroby mroby is offline
external usenet poster
 
Posts: 1
Default analyzing poll data

Assuming that your worksheet starts in cell A1, this should get you started.
You will have to make sure you have the correct cell selected in sheet2
before you run this.

Sub Macro1()
Range("A2").Select
Do Until ActiveCell = ""
If ActiveCell.Offset(0, 2) = 3 Then
ActiveCell.Range("A1:C1").Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Select
Sheets("Sheet1").Select
ActiveCell.Offset(1, 0).Select
Else: ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub

Hopefully this will get you started.


"ulfb" wrote:

I need a vb macro that:
- finds all respondents that choose option 3 for question 20
- then copies all questions/options for those respondents to a new sheet

This is above my skills - any assistance will be higly appreciated
Thank you
Ulf


ReplyId QuestNo QuestAltNo
79 10 6
79 20 3
79 30 1
79 40 2
80 10 9
80 20 5
80 30 4
80 40 3