when executing macros/vba how can they be applied on merged cells? -


i have following question: member forum yesterday provided solution problem. have 2 similar excel workbooks more 100 sheets in each, same sheet names. wanted vba copy data sheet in workbook sheet b in workbook b.

sub getdate()  dim workbooka workbook, workbookb workbook, sheeta worksheet, sheetb        worksheet, ws worksheet, sheetname string set workbooka = workbooks("clients.xls") set workbookb = workbooks("kyc.xls")  'loop through each worksheet in book each ws in workbookb.worksheets     set sheeta = workbooka.worksheets(ws.name)     set sheetb = workbookb.worksheets(ws.name)     sheeta.range("c5").copy sheetb.range("e31") next end sub 

i want use agan values cell , insert on workbookb on approprate sheet each time. problem on workbook cell want copy merged cell , destination cell. tried give name each of merged cells can't seem make it. can if can solved?

thank you

try

sheeta.range("c5").mergearea.copy    ' copies merged cells include c5 sheetb.range("e31").pastespecial     ' pastes copied e31 , merged cells part of 

Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -