I have some code that filters column H for a series of values. Then, I need to update the filtered results to "Denied". For some reason, the code I'm using is updating everything, including the header row to "Denied". It's odd, b/c I use this snippet elsewhere, and there isn't an issue. When I look up how to perform the update I'm trying to, everything I've found points to using the .SpecialCells(xlCellTypeVisible).
VBA Code:
If mDLR > 1 Then mD.Range("H2:H" & mDLR).SpecialCells(xlCellTypeVisible).Value = "Denied"
- The filter is working correctly.
- The filter returns 1 value, making the Last Row (mDLR) = 2.