Link to home
Start Free TrialLog in
Avatar of Seamus2626
Seamus2626Flag for Ireland

asked on

Add an IF(OR to find replace VBA code

I need to check for HRI* as well as HRI

Can someone add that line to the below sub

Many thanks

Sub InputHRI_WLA()
    Dim i As Long
    Dim lastRow As Long

    lastRow = Range("A" & Rows.Count).End(xlUp).Row

    For i = 2 To lastRow
 
    
        If Cells(i, 2).value = "HRI " Then
            Cells(i, 15).value = "HRI"
        End If
    Next i
 End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Seamus2626

ASKER

Thanks guys!