
Originally Posted by
wakeupcall
Hi ratdogexcel,
In that case it would defintely help if I could see the code of your current macro so that I know what condtion it searches for to equal True and in what Excel object exactly
Also, does the before tab contain a pivot table, table or just data range. The result tab - is it cumulative or is it overwritten every time the macro is run?
To what extent is the structure of your original file (in terms of sheets and objects in them) replicated in the excel file I have seen?
If there is not an exact match, it would be helpful to see such
Here is the code i use to transfer the selected items into a new sheet
Sub Transfer_Checks()
'clear cells
Sheets("RA_Temp").Select
Range("A4:H3000").Select
Selection.ClearContents
Range("A2").Select
Sheets("Hazard_Tree").Select
LR = Cells(Rows.Count, "A").End(xlUp).row
drow = 4
'Step1
For r = 2 To LR
'Sheets("Hazard_Tree").Select
If Cells(r, 7) = True Then
'Step Name
Sheets("RA_Temp").Cells(drow, 2) = Sheets("Hazard_Tree").Cells(1, 7).Value
'Hazard
Sheets("RA_Temp").Cells(drow, 3) = Sheets("Hazard_Tree").Cells(r, 3).Value
'Risk
Sheets("RA_Temp").Cells(drow, 4) = Sheets("Hazard_Tree").Cells(r, 4).Value
'Control
Sheets("RA_Temp").Cells(drow, 5) = Sheets("Hazard_Tree").Cells(r, 5).Value
'Sheets("RA_Temp").Cells(drow, 11) = Sheets("Hazard_Tree").Cells(r, 1).Value
'Sheets("Hazard_Tree").Select
drow = drow + 1
End If
'Sheets("RA_Temp").Select
Next
Sheets("RA_Temp").Select
End Sub
Test checkbox 25-12-13.xlsm
This code is within Master module.
To run the whole thing I use "sequence"
Bookmarks