Hi,
set up this code to filter out unique names from a list of consultants:
Get the error message : 'Run time error 1004: We casn't do that to a merged cell'. The following part of the code is marked in the debugger:
Though, there are no merged cells in the sheet where I try to do the advanced filtering. Where am I doing wrong???
set up this code to filter out unique names from a list of consultants:
Code:
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Sheets("Resurstid").Visible = True
With Sheets("Resurstid")
Range("A:F").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"H1:M2"), CopyToRange:=Range("H4"), Unique:=True
End With
Sheets("Resurstid").Visible = False
Application.ScreenUpdating = True
Sheets("Analys per konsult").Select
End Sub
Get the error message : 'Run time error 1004: We casn't do that to a merged cell'. The following part of the code is marked in the debugger:
Code:
Range("A:F").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"H1:M2"), CopyToRange:=Range("H4"), Unique:=True
Though, there are no merged cells in the sheet where I try to do the advanced filtering. Where am I doing wrong???