Filtering and Sorting in Excel 2010

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
183
Office Version
  1. 365
Platform
  1. Windows
I am trying to filter some data on a Spreadsheet dependant on what I input into Cell J3. I would like to automatically filter the data and sort at the same time. I have some titles in row A20 to D20. The data in row B21 onwards should be the same as the info as what I input in cell J3, however, I would like to sort the data in row A21 onwards. I have a number of formulae on the top of the Spreadsheet that perform calculations (Subtotals) on a filtered list. I have tried several variations and I have looked on the Internet and for some reason I cannot get anything to work. I would be grateful for any help given.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
The easier way could be, sort the data before applying any filters... then apply the filters based on formulas linking to J3. This should give some help to you.
 
Upvote 0
Sort your data and run the below code. change the range and the filter column number as per your requirement.

Sub filterProject()
Range("A1:E10").AutoFilter Field:=5, Criteria1:=">=" & Range("J3").Value
End Sub
 
Last edited:
Upvote 0
Sort your data and run the below code. change the range and the filter column number as per your requirement.

Sub filterProject()
Range("A1:E10").AutoFilter Field:=5, Criteria1:=">=" & Range("J3").Value
End Sub

Sorry it has taken a while to reply. I have just arrived home. I will give your suggestion a try tomorrow when I return to work. Thanks once again for your help.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top