i have also tried this macro, but not working. getting an error, for without next.
any idea how to make it run?

rgds,
vishal