Thanks piyush, this code i have modified as per my requirement and it is working fine. i have to handle some format things while copying from source to target file

when i am copying from source and if the cell is not having a value, the target cell format is getting changed like background color is changing

Also if am copying data from source file based on some cell data like i have Details in cell A15 followed by couple of rows with data followed by blank line and then product in A18

the lines followed by details may vary file to file , can you help in handling these format things

thanks again