excel vba - Find and replace multiple character in a string VBA -


I have a large amount of data that I want to replace with the help of macro. I am currently using the code below , But the problem is that it will only change the value which is the code below D.

  Change sub () what = "D" replc = "" Sheets ("Sheet1"). What to choose: = word, replacement: = thumb, lookout: = XlPart, _ search order: = XLBIRO, matchseed: = True, search format: = falls, _ replace parameter: = false and subsystem   < P> My sample data is below as you can see that some values ​​include alphabetical characters, symbols or at the end as a combination of character or cell value, which I want to replace or remove, and some values ​​are of other values. Will be installed I am creating macros to find all the necessary possibilities and change it.  

0065D 2089 2797 3270 3315 0066D 20 9 57 27 99 3300 3334 0067D 2105 2802 3582 AX < A A 2089 2812 3307 3383 2095 2111 1164D 3315 3385 2105 2112 1165D 3334 3400 2110 2114 2841 3336f < / Strong> 3507 0771 n 2121 2881 3365 3515 n * 0908 p * 2130 2883 3372X 3548

2131 2913 3373 3559 2111 2143 2915 3373 3574

You also notice that there are fewer lower case letters now IF condition find < Trying to experiment with / strong> but could not succeed. I am making macro above every possible situation and replacing it with another macro which is something like the bottom.

  If you find "D" then run the macro "Change" Elsef Search "X" Macro "Change" Find Elseif "F" Run Macro "Change" and so on ... .   

But if the macro does not find the required letter in the sheet, then this next step and so on. I want this so bad. I have to change it regularly on the number of times.

So any help would be appreciated.

Thanks

You can add / remove required characters from toRemove () array. Removing Remove () to dim the sub-substitutes () = () "array" ("D", "X", "F") for each immut () remove each ICL What is iCell.Replace in ActiveSheet.UsedRange in: = itm, Replacement: = "", Match-CAS: = True Next ICL Next ITM End Sub

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -