in excel using columns calculations use information other columns who's information copied file. external data can have varying number of rows, however, trying figure out vba code pull down calculations or pull them expand or compress rows match imported data.
so example, column brought in elsewhere , b calculation column.
a b 1 a2*2 2 a3*2 3 a4*2 4 a5*2
now suppose copy in column has 8 rows. want pull down column b has 8 rows well. form guidance wouuld appreciated.
it sounds can possibly manually autofill, if wish use macro started:
sub macro1() ' put function here range("b1").formular1c1 = "=rc[-1]*2" dim dest integer dest = range("a1").end(xldown).row range("b1").autofill destination:=range("b1:b" & dest), type:= _ xlfilldefault end sub
this autofill function in column b data contained in column a. stated need "expand or compress rows match imported data." can clearing b column @ beginning of macro.
hopefully helps, if confusing or not problem let me know.
Comments
Post a Comment