Find and replace whole cell by substring

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,721
Office Version
365
Platform
Windows
Using this
Code:
            thisWs.Columns(1).Replace "*" & .Range("A" & i).Value & "*", .Range("B" & i).Value, xlPart, , False, , False, False
Should work, because it will change the entire contents of the cell
 

CaptainCsaba

Board Regular
Joined
Dec 8, 2017
Messages
78
Yes it does! It works wonderfully now! Thank you for taking the patience and for figuring this one out. You just helped us not doing a days work every month. Thank you!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,721
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,102,439
Messages
5,486,905
Members
407,570
Latest member
cannotquitexcel

This Week's Hot Topics

Top