VBA Wildcard character help

tawoodwa

New Member
Joined
Jan 9, 2017
Messages
17
I have this code, and it works perfect when the value is exactly when its "FFM-BLS15.01.00", but i need to adapt the code so that it catches all cells with "FFM" at the beginning, I tried using "FFM*" but apparently you cant use that wildcard character with an = operator. Can anyone please help me rewrite this so that it works that way?


Code:
With worksheet_to_process
    Dim LR As Long, i As Long
    LR = worksheet_to_process.Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
            With worksheet_to_process.Range("B" & i)
             If .Value = "FFM-BLS15.01.00" Then
             worksheet_to_process.Rows(i).Select
             Selection.Delete Shift:=xlUp
             i = i - 1
             End If
             
            End With
        Next i
    End With
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,284
Messages
6,124,064
Members
449,139
Latest member
sramesh1024

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