Hello,
@MARK858 - Is it possible for you to help me on this please.
I have a Pivot table, where i need to Select Blank Column next to last row of Pivot table and Put Filter. I tried some coding but i am getting an error. Please help to rectify.
Steps:
1. select Row from a Blank Column (Here it is "X") next to Last row of Pivot Table till "Column A" (As per Screen shot K to A)
2. Right Click "Blank Column (Here it is "X") next to Last Row of Pivot table
3. Choose "Filter" then "Filter by Selected Cell's Icon"
4. "Select All" in Filter
Image 1: Before Filter
Image 2: After Filter (Result expecting)
@MARK858 - Is it possible for you to help me on this please.
I have a Pivot table, where i need to Select Blank Column next to last row of Pivot table and Put Filter. I tried some coding but i am getting an error. Please help to rectify.
Steps:
1. select Row from a Blank Column (Here it is "X") next to Last row of Pivot Table till "Column A" (As per Screen shot K to A)
2. Right Click "Blank Column (Here it is "X") next to Last Row of Pivot table
3. Choose "Filter" then "Filter by Selected Cell's Icon"
4. "Select All" in Filter
VBA Code:
LastCl = Rows(9).Find("*", , xlValues, , xlByColumns, xlPrevious).Select
'LastCl = ActiveCell.Column
FilterRange = "A9:" & LastCl
Range(FilterRange).Select
'Below Lines are from record macro, i changed it to dynamic since column range may vary
FilterRange = Range(Selection, Selection.End(xlToLeft)).Select
ActiveSheet.Range(FilterRange).AutoFilter Field:=9, Criteria1:= _
xlFilterToday, Operator:=xlFilterDynamic, SubField:=10
ActiveSheet.Range(FilterRange).AutoFilter Field:=9
Range("B10").Select
Image 1: Before Filter
Image 2: After Filter (Result expecting)