Dear Paul,

Basically i don't know how to record the marco. I copied the code which you provided and opened the new excel workwook and hitted Alt+F11 and pasted there. It is not working. can you provide me any link to learn Marco from basic.