vba - Apply formula to last cell in column -
i know question has been asked before question different, want search column last cell in column data in (which can do) want apply formula cell 4 columns on right. know can introduce formula cell doing following:
dim formul variant formul -"=b25 * h25" activesheet.range("e" & rows.count).end(xlup).offset(, 4).resize(1).value = formula
but problem begins, want below, instead of setting formula because multiplication of cells changing when more information being added sheet.
formul -"=activesheet.range("e" & rows.count).end(xlup).offset(, 3).value * activesheet.range("e" & rows.count).end(xlup).offset(, -3).value" activesheet.range("e" & rows.count).end(xlup).offset(, 4).resize(1).value = formul
i need way stated above because if change information on sheet wil updat automatically.
you can use:
activesheet.range("e" & rows.count).end(xlup).offset(, 4).formular1c1 = "=rc2*rc8"
Comments
Post a Comment