Find value in One Column and Populate Different value in Another column

msvoboda27

New Member
Joined
Feb 9, 2018
Messages
17
xABC
1Col 1 ValueCol 2Find and replace the value
2FE7478PDF4if cell A2 FE7478PDF replace with value 700
3FE7477PD4
if cell A3 FE7477PDF replace with value 710

<tbody>
</tbody>
4FE744PDF4if cell A4 FE744PDF replace with value 915

<tbody>
</tbody>













I am trying to do a search and replace with one value and populate in a different cell. I also like to make this a macro if possible.
Thank you.
Michael
Unsure how to attach excel doc
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi, try this:

Code:
Sub loop_through_all_worksheets()


Dim ws As Worksheet
Dim idcount As Long


Set ws = ActiveSheet


    For i = 2 To ws.Columns(1).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    
    Select Case Cells(i, 1).Value
        Case "FE7478PDF"
        Cells(i, 3).Value = "700"
        Case "FE7477PD"
        Cells(i, 3).Value = "710"
        Case "FE744PDF"
        Cells(i, 3).Value = "915"
    End Select
    Next i


End Sub
 
Last edited:
Upvote 0
Hi
I like to do a search and replace in Excel formula but the replaced cell in a adjacent cell.
Col A. Col B
567899. Value 4

If cell contents 567899 then overwrite contents from value 4 to new value, say 700.
Does that help, thanks for response
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,054
Members
448,940
Latest member
mdusw

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