Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.
Sub testmethod() Dim count1 As Long Dim count2 As Long Dim count3 As Long Dim count4 As Long Dim count5 As Long Dim count6 As Long Dim myValue As Long count1 = 2 count2 = 14 count3 = 2 count4 = 1 count5 = 2 count6 = 2 rawData.Activate ' activating the relevant worksheet Range("A2").Select ' selecting the reference point If ActiveCell.Value = "106" Then ' these are codes, different number refers to different person Do myValue = ActiveCell.Offset(0, 13).Value ' assign the value 13 cells to the right of the active cell to a long variable myData.Activate ' the next sheet where I want to paste the data Cells(count5, count6).Value = myValue ' pasting the data in the relevant cell count6 = count6 + 1 'moving one column to the right on the same row rawData.Activate 'back to the worksheet to copy the data ActiveCell.Offset(1, 0).Select ' move one row down Loop While ActiveCell.Value = "106" 'loop while that condition holds ElseIf ActiveCell.Value = "108" Then count5 = count5 + 1 ' moves the counter so that in the copying to sheet i start copying one row down for the next participant. Do myValue = ActiveCell.Offset(0, 13).Value myData.Activate Cells(count5, count6).Value = myValue count6 = count6 + 1 rawData.Activate ActiveCell.Offset(1, 0).Select Loop While ActiveCell.Value = "108" End If End Sub
|Auto Center Controls on a Form Based on Screen Size/Resolution in MS Access||10||38|
|How can I create a Message box thru a Macro action for yes / No?||26||57|
|Find and Replace Function not working in Excel||13||43|
|Excel VBA - UserForm Label Caption to show recordset data dynamically||12||17|