Hello,
I have a spreadsheet where I want to replace the contents of a cell with the contents of another cell based on a table. I've written a VBA code that'll work if the replacement content is less than 255 characters, but gives me an error is the replacement text is longer than that. Can anyone help me with a solution? I've included screenshots of my workbook and the code I currently have. Thank you in advance for your help!
I have a spreadsheet where I want to replace the contents of a cell with the contents of another cell based on a table. I've written a VBA code that'll work if the replacement content is less than 255 characters, but gives me an error is the replacement text is longer than that. Can anyone help me with a solution? I've included screenshots of my workbook and the code I currently have. Thank you in advance for your help!
VBA Code:
Sub FindReplace()
For i = 2 To 500
Worksheets("For Duping").Range("F:AE").Replace What:=Worksheets("Replacement Table").Cells(i, 1).Text, _
Replacement:=Worksheets("Replacement Table").Cells(i, 2).Text, LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False
Next i
End Sub