Hello !
Im having a slight problem with a macro of mine. Normally i would fool around with it till i get it right but since its one of my last days here i have to be quick. So hopefully someone here can help !
im trying to create a macro which will select all the results of codes that come out once i use a filter function. Since i dont know how many codes are going to be coming out the macro has to be quite variable.
This is what i have so far
All i get now are the codes i get in column B , but in column C to Z is also information that needs to be copied into the new sheet. But i cant seem to find a way to broaden the selection. Hope someone out here knows !
Any help is appreciated !
Im having a slight problem with a macro of mine. Normally i would fool around with it till i get it right but since its one of my last days here i have to be quick. So hopefully someone here can help !
im trying to create a macro which will select all the results of codes that come out once i use a filter function. Since i dont know how many codes are going to be coming out the macro has to be quite variable.
This is what i have so far
Code:
Sub Macro3()
'
' Macro3 Macro
'
On Error Resume Next
Set wSheet = Sheets("Name")
If wSheet Is Nothing Then 'Doesn't exist
Set wSheet = Nothing
On Error GoTo 0
Else 'Does exist
ActiveSheet.Range("$B$1:$BC$12").AutoFilter Field:=25, Criteria1:= _
"Name"
ActiveSheet.Range("$B$1:$BC$12").AutoFilter Field:=24, Criteria1:= _
"Retour aanvrager gestuurd."
Set rRange = Range("B2", Range("B65536").End(xlUp).Offset(1)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
If Selection.Cells.Count < 1 Then
Exit Sub
Else
ActiveRow = ActiveCell.Row 'gets row address of active cell
Range(Cells(ActiveRow, 2), Cells(ActiveRow, 24)).Select
All i get now are the codes i get in column B , but in column C to Z is also information that needs to be copied into the new sheet. But i cant seem to find a way to broaden the selection. Hope someone out here knows !
Any help is appreciated !