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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -