Find text in a cell and replace with text from another cell

Flexi1

New Member
Joined
Feb 15, 2015
Messages
15
Hi

This might be a really silly question but how do you find specific text located in one cell e.g. C1 and replace the text with the content from another cell e.g. A1

I need to copy all the text from A1 and find and replace specific text from C1 with the content from A1

This then needs to replicated down the spreadsheet with 20,000 rows

Hope someone can help me out here
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi
As I understand
VBA Code:
Sub test()
    Dim x, lr, i, ii
    InputBox ("TYPE text to be Changed")
    For i = 1 To Cells(Rows.Count, 3).End(xlUp).Row
        x = Split(Cells(i, 3), " ")
        For ii = 0 To UBound(x)
            If x(ii) = "NNN" Then
                x(ii) = Cells(1, 1)
            End If
        Next
        Cells(i, 4) = Join(x, " ")
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,613
Messages
6,120,515
Members
448,968
Latest member
Ajax40

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