I copied your macro into the spreadsheet but on a different sheet.
Completely wrong, I think your requirements to manipulate the data are beyond your abilities.
You need to take your time and learn Excel. Rohn has shown many information's and links to sites, you should work through that.
Here is a good beginner tutorial for macros:
Excel Visual Basic Tutorial - VBA Macros Online Training
To execute my macro follow this steps:
Right-click on the sheet tab
Choose "View Code"
Within the menu click Insert \ Module
Paste the following code
Close the VBA editor
Press Alt-F8
Choose the macro
Click Run
Andreas.