Hi Guys,
Im quite on a basic level in vba so sorry if the question is absurd.
I wanted to filter to a specific element copy all filtered date to a new sheet and do some operations on the new sheet.
I wanted to solve it with a function like this:
Function poc3_vlan(node As String) --> node would be the filer criteria but the filtering is not working if I use a function:
---------------------------------------------
Ive tried with caling a sub also:
So basically at the first step Im just intrested how to solve the filter,select etc in a function.
Please help me how to do it
thanks
Im quite on a basic level in vba so sorry if the question is absurd.
I wanted to filter to a specific element copy all filtered date to a new sheet and do some operations on the new sheet.
I wanted to solve it with a function like this:
Function poc3_vlan(node As String) --> node would be the filer criteria but the filtering is not working if I use a function:
Code:
Function f_node(node As String)
ActiveSheet.Range("A:BB").AutoFilter Field:=5, Criteria1:=xxx
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Cells.Select
ActiveSheet.Paste
End Function
Ive tried with caling a sub also:
Code:
Function f_node(node As String)
Call s_node(node)
End Function
Sub s_node(target as string)
ActiveSheet.Range("A:BB").AutoFilter Field:=5, Criteria1:=target
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Cells.Select
ActiveSheet.Paste
End Sub
So basically at the first step Im just intrested how to solve the filter,select etc in a function.
Please help me how to do it
thanks
Last edited by a moderator: