excel - Adding a single cell to a Range in a formula -
i have sub dynamically selects range of cells , passes range in internal rate of return formula. need have single cell appended beginning of range formula work. see below:
dim calcrange range set calcrange = range(range("b57"), range("b57").end(xltoright)) range("irr").formula = "=irr(" & calcrange.address & ")"
so ideally, i'd add named range cell "investmentoutlay" first cell in range. investmentoutlay cell on previous sheet, order i'd formula run through
=irr(investmentoutlay,b57,c57, etc)
... possible do?
like this, using union
join 2 ranges?
set calcrange = union(range("investmentoutlay"), range(range("b57"), range("b57").end(xltoright)))
Comments
Post a Comment