GreatOffender
Board Regular
- Joined
- Feb 2, 2015
- Messages
- 53
Greetings, With a lot of board help I was able to cobble together a functional macro to assist in my day to day work requirements. I do however have a problem that has been on and off and I will explain. The problem is "on" when the macro places a filter an condition that are not met and it halts and awaits debugging. Fortunately this has been the exception and not the rule but today I have time to work on it so I will present my dilemma and hope anyone and everyone with Macro experience will be able to lead me out of the woods. Problem occurs when none of the entries meet the filter requirements and the data changes daily so I cannot foresee the impending issue until it is run.
Thank you,
Thank you,
VBA Code:
Set wf = Application.WorksheetFunction
Set rngData = .Range("A2:A" & lngLastRow)
With rngData
.AutoFilter Field:=3, Criteria1:=Array( _
"3456", "3125", "3451", "3110", "3370"), Operator:=xlFilterValues
For Each c In wsd.AutoFilter.Range.Range("M2:M" & lngLastRow).SpecialCells(xlCellTypeVisible)
c.Value = wf.WorkDay(c.Value, 1)
Next