We will struggle to replace multiple values at once which we required, In Excel, find and replace available for one value replacement. As we all known, we can use Find and Replace function to find multiple same cell and replace them with a value as you need. But sometimes, you need to apply many-to-many replacement simultaneously. For example, I have a range of data which is for duty roster codes, and now I want to replace all codes into shift timing, S1 to 06:00 - 18:00, S2 to 06:00 - 15:00 and so on as following screenshots shown,
With the help of VBA code we can replace all codes into shift timing at once.
Before creating code, you need to keep both values, original data as well as replaced values in your excel sheet like above.
Then hold the above data , Press ALT+F11 Key to open Microsoft Basic Window
Click Insert -> Module -> Type or paste below code in the window
VBA Code : Find and replace multiple values at once
8. Now see all range has been replaced with respective shift timing.
This is the way we can find and replace with multiple values at once. This function is useful for all.
If you have any doubts,Please let me know