I am currently trying to find a Macro that can be used to find and replace multiple values in one cell (the cell content and location can change). I am a complete novice, and am really not sure what I am doing!
I have Sheet1 that contains the following information:
1 This is
2 The text
3 I would like to be copied
4 Into my workbook
50 in full
In another sheet in the workbook (which is re-named frequently) I have cells with multiple numerical values which correspond to the text in cell B. E.g. in G4 I will have: 1, 2, 3, 50
I would like to run a macro which looks up the numbers in selected cell(s), and replaces it with the text. So:
1, 2, 3, 50 should become: This is, The text, I would like to be copied, in full
I currently have VBA code that successfully finds and replaces the values, but only up to 9. Then it starts replacing only part of double digits (10, 11 etc.) I know that this is due to:
LookAt:=xlPart in the VBA but when changed to
xlwhole, it does not work at all.
I am not sure how to change the code to allow it to find and replace numbers past 9... if there is anyway anyone could help, that would be great!
Thank you in advance!