Thanks,

if last column is not column J but I calculated it using .End(xltoleft) then
how can I modify above program to include last col.

This answer would help me a lot.