Hudson Andrew
New Member
- Joined
- Sep 28, 2016
- Messages
- 31
Hi all ,
Mr excel been quite help full to all who seek assistance in the fields of VBA and excel . i have been wondering if some one from the form helps me how to fix the below code to fuction more dynamic.
let say for example : below code filter column (K) " DA,DB,DZ" and put a a comment in adjacent column ("S") " Deduction". so far so good . if " DA DB,DZ " seems missed it should not give any output . however below code is changing header of the column " S " in absence of "DA,DB,DZ" ..
now i would request some one to advice how to put a pause to the below code if the " DA, DB,DZ " misses in the filter criteria . below is the code for your reference.
i have raised the same question in below forum.
Filter and name the rows when available
Mr excel been quite help full to all who seek assistance in the fields of VBA and excel . i have been wondering if some one from the form helps me how to fix the below code to fuction more dynamic.
let say for example : below code filter column (K) " DA,DB,DZ" and put a a comment in adjacent column ("S") " Deduction". so far so good . if " DA DB,DZ " seems missed it should not give any output . however below code is changing header of the column " S " in absence of "DA,DB,DZ" ..
Code:
[/COLOR]Sub filter_deduction()
Range("K1:K" & Range("K" & Rows.Count).End(3).Row).AutoFilter 1, Criteria1:=Array("DA", "DB", "DZ"), Operator:=xlFilterValues
Range("S2:S" & Range("K" & Rows.Count).End(3).Row).SpecialCells(12).Formula = "Deductions"
ActiveSheet.AutoFilterMode = False
End Sub
[COLOR=#333333]
now i would request some one to advice how to put a pause to the below code if the " DA, DB,DZ " misses in the filter criteria . below is the code for your reference.
i have raised the same question in below forum.
Filter and name the rows when available