excel - Percentage finding -
i want calculate percentage as:
range("e7").value "=(e5/(e5+e6))"
this works fine static range. after i'm inserting row like:
range("a1").entirerow.insert
and percentage column remains static want formula shift 1 row down as:
range("e8").value = "(e6/(e6+e7))"
use range object resolve problem, range object move when insert or delete row or column.
sub answer() dim percentage range set percentage = range("e7") range("a1").entirerow.insert percentage.formular1c1 = "=r[-2]c/(r[-2]c+r[-1]c)" end sub
Comments
Post a Comment