Ok, as noted by Pepe, you'll need VBA to do what you want.

I suggest you start a new thread in the Excel Programming / VBA / Macros forum and include a link to this thread so that people can see what has already been discussed.

Good luck!