Excel : Copy entire row to different sheet using VBA -
i seeking excel vba expert.
i have attached excel file reference.
in "input" sheet there production schedule generated on submit button click. , same schedule have copied in "output" sheet. not able paste in desired location (blue highlighted area).
another challenge me retain relevant data corresponding year , clear rest. means suppose schdule 34 years, if again generate 20 years keep values of class , class ii till 20 years , clear rest.
the same has in output sheet also.
some 1 please @ earliest.
thanks , regards,
santosh
the code within submit_click:
**sub submit_click() `enter code here`dim no_years integer dim i_val integer range("c10").activate activecell.entirerow.clear activecell = range("b3").value no_years = range("b4").value i_val = range("b5").value while no_years > 0 activecell.offset(0, 1).activate activecell.value = dateadd("yyyy", i_val, activecell.offset(0, -1).value) no_years = no_years - 1 loop ' copy production schedule calender sheets activecell.entirerow.copy destination:=sheets("output").range("a" & rows.count).end(xlup).offset(1) msgbox ("production schedule calendar generated") end sub**
the easy way this:
activesheet.rows("1:1").copy sheets("output").paste
is you're looking for?
Comments
Post a Comment