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

Flexi1

New Member
Joined
Feb 15, 2015
Messages
7
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
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

mohadin

Well-known Member
Joined
Mar 22, 2015
Messages
1,091
Office Version
  1. 2013
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,128,140
Messages
5,628,937
Members
416,354
Latest member
JojoMaque

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
Top