Filter data By Strikethrough In Excel?

Hi,
I have some excel files with strike out data. requirement is to check each sheets, each row if strike out data occurs then add 1 in new column.
is there any solution can be solve by VB.net?

Thanks

Hey @Aaron_Ko

For sure. I’ve created a simple VBA script for you, which does the job (checks if there is a Strikethrough). If yes, write “1” in the next column. We invoke it with an “Invoke VBA” activity inside an “Excel Application Scope” activity. Everything is attached.

The simple Excel dataset (attached as Book1.xlsx)

The VBA code to invoke (attached as StrikeThrough.txt)

Sub StrikeThrough()

For n = 1 To Rows.Count

If Range("A" + CStr(n)).Font.StrikeThrough Then

    Range("B" + CStr(n)).Value = "1"
    
End If
Next n
End Sub

The UiPath workflow (code is attached as Main.xaml):

Let me know if that solved it :slight_smile:

AaronStrikeThroughDemo.zip (9.7 KB)

3 Likes

Thanks a lot Jensen, u made my day. one more question, if the check range will be A to K column and pass range value “1” to J column how can i do that?
Do i do Range(“A” + CStr(n)):“K” + CStr(n))).Font.StrikeThrough Then
Range(“J” + CStr(n)).Value = “1”