Skip to main content

How to sort or filter data by strikethrough in Excel?

Author: Xiaoyang Last Modified: 2020-05-22

In Excel, we often format the data with strikethrough to indicate the items are no longer required. And sometimes, we need to filter or sort the data which containing the strikethrough, so that we can quickly deal with these rows. Is there any quick tricks for us to sort or filter the data by strikethrough?

Sort or filter data by strikethrough with User Defined Function

Filter data by strikethrough with Kutools for Excel


arrow blue right bubble Sort or filter data by strikethrough with User Defined Function

Unfortunately, there is no direct way for us to sort or filter the strikethrough data by using Sort or Filter function, but, we can create a simple User Defined Function to mark the data with strikethrough first, and then apply the sort or filter feature.

Supposing I have the following range of data with strikethrough as screenshot shown, you can sort or filter the strikethrough data with following steps:

doc-sort-by-strikethrough1

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

Function HasStrike(Rng As Range) As Boolean
HasStrike = Rng.Font.Strikethrough
End Function

3. Then save and close this the window, in a blank cell beside your data, please enter this formula =HasStrike(A2), in this case, I will enter it to cell C2. See screenshot:

doc-sort-by-strikethrough1

Note: In the above formula, A2 is the value that you need to identify if it is formatted as strikethrough. You can change it as your need.

4. Then drag the fill handle over to the cells that you want to apply this formula. As the following screenshot shown, you can see, if the data is formatted as strikethrough, it is displayed as TRUE, and the normal data is displayed as FALSE.

doc-sort-by-strikethrough1

5. Then you can sort or filter by this new column C.

A: Sort the strikethrough data at bottom or top of the records:

(1.) Click Data > Sort, see screenshot:

doc-sort-by-strikethrough1

(2.) Then in the popped out Sort Warning dialog, check Expand the selection option.

doc-sort-by-strikethrough1

(3.) And click Sort button, in the Sort dialog box, choose Column C which is your new created column from Column drop down list, and then choose Values under the Sort On option, finally select the Order you would like to sort. See screenshot:

doc-sort-by-strikethrough1

(4.) Then click OK to close this dialog, and the strikethrough data has been sorted at the bottom of the value. See screenshot:

doc-sort-by-strikethrough1

Tip: If you want to sort the strikethrough data to the top of all the data, you just choose Largest to Smallest in step 3.

B: Filter the records by strikethrough

(1.) Select your whole data range, here I select range A1 : C14, and click Data > Filter, see screenshot:

doc-sort-by-strikethrough1

(2.) Then click the drop down button beside cell C1, and then just check TRUE option only, see screenshot:

doc-sort-by-strikethrough1

(3.) Then click OK, and all the strikethrough data has been filtered.

doc-sort-by-strikethrough1

Note: After finishing the sort and filter, you can delete the value in Column C.


arrow blue right bubble Filter data by strikethrough with Kutools for Excel

If you have Kutools for Excel, with its Filter Strikethrough feature, you can quickly filter all cells which are formated as strikethrough.

Note:To apply this Filter Strikethrough, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Select the column that you want to filter cells with strikethrough, and then click Kutools Plus > Special Filter > Filter Strikethrough, see screenshot:

doc-sort-by-strikethrough1

2. And then, a prompt box will pop out to remind you how many cells are matched witht the criteria, see screenshot:

doc-sort-by-strikethrough1

3. Then click OK button, all cells which are formated with strikethrough are filtered out, see screenshot:

doc-sort-by-strikethrough1

Click Download Kutools for Excel and free trial Now!


Related articles:

How to sort rows by odd or even numbers in Excel?

How to sort rows to put the blank cells on top in Excel?

How to sort data by the most frequent value in Excel?

How to sort email address by domain in Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (24)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Werkt geweldig. Bedankt. Echter, hoe kan ik de file weer saven als .xlsx file. Ik krijg telkens een foutmelding als ik dit doe. Dank je.
This comment was minimized by the moderator on the site
Hi, Carine,
Because there is VBA code in the workbook, when you close the workbook, you should save this workbook as Excel Macro-Enabled Workbook (*.xlsm) format.
When opening this workbook next time, please click the Enable Content at the top of the formula bar to activate the code.
PPlease try, hope it can help you!
This comment was minimized by the moderator on the site
Thanks, it worked
This comment was minimized by the moderator on the site
This is perfect, thank you!
This comment was minimized by the moderator on the site
Well done, thank you!
This comment was minimized by the moderator on the site
You can filter with MS Excel without having to do this script. Just Ctrl-F Find, Search by Format, Strikethrough checkbox, Find All, Then Select All (Crtl-A), then hide (Crtl-9).
This comment was minimized by the moderator on the site
I tried this but it crashed, seems when there is a lot of data it is really slow
This comment was minimized by the moderator on the site
I'm getting #NAME? instead of True or False
This comment was minimized by the moderator on the site
I tried this and I first got a message that my sheet needed to be saved as one with macros. I saved it as xlsm Then I pasted the =HasStrike(A2) and it gave me #NAME? in the cell. What am I doing wrong? Thnaks!
This comment was minimized by the moderator on the site
Thanks a bunch for this, you have saved me a few hours of manual labour!
This comment was minimized by the moderator on the site
well that worked perfectly. Thank you very much
This comment was minimized by the moderator on the site
well that worked perfectly. THANKS.
This comment was minimized by the moderator on the site
Thank you very much! This saved my day!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations