excel - VBA loop to autofill a dynamic range -
been performing keyboard head motivation ritual trying block of code work.
what it's trying create range cell references(numeric) , autofill formula on 1 column increment row. runs until equal projweeks
projweeks = 36 axisrow = 46 axiscol = 5 = 0 projweeks axisrow = 46 dim tstart range set tstart = outputsht.cells(axisrow, axiscol) dim tdest range taxiscol = axiscol + 1 set tdest = outputsht.cells(axisrow, taxiscol) selection.autofill destination:=range(tstart:tdest), type:=xlfilldefault *///crashes on syntax* axisrow = axisrow + 1 set tstart = outputsht.cells(axisrow, axiscol) set tdest = outputsht.cells(axisrow, taxiscol) selection.autofill destination:=range(tstart:tdest), type:=xlfilldefault axisrow = axisrow + 1 set tstart = outputsht.cells(axisrow, axiscol) set tdest = outputsht.cells(axisrow, taxiscol) selection.autofill destination:=range(tstart:tdest), type:=xlfilldefault axisrow = axisrow + 1 set tstart = outputsht.cells(axisrow, axiscol) set tdest = outputsht.cells(axisrow, taxiscol) selection.autofill destination:=range(tstart:tdest), type:=xlfilldefault axiscol = axiscol + 1 next is there way reference , increment cell locations run loop? vba isn't strong point least.
selection.autofill destination:=outputsht.cells(axisrow, axiscol).resize(1,2), _ type:=xlfilldefault
excel vba excel-vba
No comments:
Post a Comment