How to replace multiple values at once in Excel ?

MD Achievers
0



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,  How to replace multiple values at once in Excel


Duty Roster for the current month:


Shift Codes:

With the help of VBA code we can replace all codes into shift timing at once.

  1. Before creating code, you need to keep both values, original data as well as replaced values in your excel sheet like above.

  2. Then hold the above data , Press ALT+F11 Key to open Microsoft Basic Window

  3. Click Insert -> Module -> Type or paste below code in the window


VBA Code : Find and replace multiple values at once



4. Window will show like this after paste.




5. Press F5 to execute this code.

6. Once pressed F5 ,Pop up box will open to select the original range, then select the range like below then press OK



7. Next, below pop up box will open to select replace range, then select the range like below, Press OK



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. 



Watch this video in a physical way how to do it. 


Post a Comment

0Comments

If you have any doubts,Please let me know

Post a Comment (0)
>