Find and replace register and trademark

luckyscheu

New Member
Joined
Mar 3, 2017
Messages
1
This might be super easy but here goes.

I need to see if a "Product Name register mark" lives in column C. If it does, then the register mark for that Product Name needs to be eliminated in column AB.

Also, I need to see if a "Product Name" has a register mark in the first instance, then it DOES not need to be included in the additional instance within that cell.

Is this possible!?

Thank you so much,
Hayley
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
So to clarify you are trying check a list of Product Names listed in Column C and if the Product Name contains the ® symbol then you want to delete the value on that row in Column AB?

This will loop through all the products in Column C and anywhere it finds the ® symbol it will delete the value in Column AB Accordingly.
This is assuming you only have one instance of the product in column AB and it is on the same row in both Column C and AB.

Code:
Sub Tester()
Dim celltxt As String
Dim OnRow As Integer
OnRow = 1
LR = Cells(Rows.Count, "C").End(xlUp).Row
For i = 1 To LR
celltxt = ActiveSheet.Range("C" & OnRow).Text
If InStr(1, celltxt, "®") Then
Range("AB" & OnRow) = ""
End If
OnRow = OnRow + 1
Next I
End Sub


If however you have each product listed once in Column C and you want to delete every instance of the product from Column AB when it has the ® symbol then you can use this

Code:
Sub Tester()
Dim celltxt As String
Dim OnRow As Integer
OnRow = 1
OnRow2 = 1
LR = Cells(Rows.Count, "C").End(xlUp).Row
For i = 1 To LR
celltxt = ActiveSheet.Range("C" & OnRow).Text
        If InStr(1, celltxt, "®") Then
            LR2 = Cells(Rows.Count, "AB").End(xlUp).Row
        For e = 1 To LR2

celltxt2 = ActiveSheet.Range("AB" & OnRow2).Text
    
        If celltxt = celltxt2 Then 'InStr(1, celltxt2, celltxt1) Then
            Range("AB" & OnRow2) = ""
            
        End If
        OnRow2 = OnRow2 + 1
        Next e
    
        End If
    OnRow = OnRow + 1
Next i
End Sub


I am not clear on the 2nd part of your request, not sure what you mean by this can you please elaborate.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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