Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to sort or filter data by strikethrough in Excel?

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


Filter data by strikethrough quickly and easily:

Kutools for Excel's Filter Strikethrough utility can help you to filter all cells which are formatted as strikethrough quickly and easily.

doc-sort-by-strikethrough 14

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


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.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

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?


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Nat · 2 months ago
    This is perfect, thank you!
  • To post as a guest, your comment is unpublished.
    Niko · 6 months ago
    Well done, thank you!
  • To post as a guest, your comment is unpublished.
    Rix · 1 years ago
    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).
  • To post as a guest, your comment is unpublished.
    Dawn · 2 years ago
    I'm getting #NAME? instead of True or False
  • To post as a guest, your comment is unpublished.
    Dawn · 2 years ago
    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!