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

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -