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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -