This should work for you. To run this, go to the VBA window in excel (can be reached by pressing Alt + F11), create a new module by pressing insert > module, and paste the code in. Then, go to Tools > References and enable "Microsoft Scripting Runtime" by checking the box. After that, all you need to do is run the macro either by pressing the green arrow in the VBA window or by pressing F5. I'll attach a document with the code; sheet 2 shows the output, sheet 1 was your input. Hope this helps!
P.S. there is a forum specifically for VBA/macros found at https://www.excelforum.com/excel-pro...ng-vba-macros/
If you have any more questions this would be the place.
Bookmarks