Hello Guys,
I am looking for a macro that will conditionally copy & paste the data
I have a file macro.xlsm & vba macro will be placed in a macro.xlsm & i have one more file sample1.xls (both files are located in different path & the path should be hardcoded in the macro, so that i can change it as per my needs )
We have to copy data from sample1.xls (sheet1 ) & paste it to macro.xlsm (sheet2)
Condition: Macro.xlsm (sheet2) may be a blank sheeet or it may have a data, If it is a blank sheet then simply copy paste the complete data from sample1.xls (sheet1 ) to macro.xlsm (sheet2) & if It has a data then match column B data of macro.xlsm(sheet2) with column B of sample1.xls (sheet1) & if it matches then dont copy that row & copy rest of data & paste it
Plz see Output sheet(If macro.xlsm has data in sheet2 then that will be the output& if it is a blank sheet then simple copy & paste)
Thnx
Bookmarks