'VBA Autofilter Sort data using new Values
I am using Autofilter VBA option to Sort Data but I am not able to write a code to come to first line of code when I hit the autofilter area to populate new values for it.
Suppose Say i am applying filter on column R and sort Value as "null" and in U column I want to name the entire filtered values with a new name called " Null" But in vba once the filter is applied it is not able to detect the first row of excel. I have attached the screenshot please guide me.
Thanks in advance.
Sub Test_1()
With Worksheets("Collated_File").Range("A1")
.AutoFilter Field:=19, Criteria1:="1"
.AutoFilter Field:=18, Criteria1:="*null*"
End With
**Range("U2").Select** (Stuck because it is not detecting the first line of filtered value)
**ActiveCell.Value = "Null"**
ActiveCell.Offset(0, -1).Select
Selection.End(xlDown).Select
Selection.Offset(0, 1).Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
