GreatOffender
Board Regular
- Joined
- Feb 2, 2015
- Messages
- 53
Trying to make this simple and easy to understand. I have spreadsheet with transaction types in the “C” column. There are due dates in the “L” column. I need to filter the “C” column by certain values and increase the dates in the “L” column by one day. My problem is that I seem to get turned around after I filter the column and my DateAdd increase everything and not just the filtered values. I am trying to avoid creating the dummy sheet example but will add it if necessary. My confusion starts after the filtering
VBA Code:
Sub Date_Add()
Dim rngData As Range
Dim ws As Worksheet
Dim lngLastRow As Long
Set ws = Sheets(1)
With ws
.Columns("A:Q").AutoFilter
lngLastRow = .Range("C" & .Rows.Count).End(xlUp).Row
Set rngData = .Range("C2:C" & lngLastRow)
End With
Application.DisplayAlerts = False
With rngData
.AutoFilter Field:=3, Criteria1:=Array( _
"3456", "3125", "3451", "3110", "3370"), Operator:=xlFilterValues
?????????
Application.DisplayAlerts = True