VB Array - Select column

T

Troubled User

I am loading a five column Array with various pieces of information related
to a cashflow series. In column 3 I have the cashoutflows and inflows, which
I would then like to pass (just column 3) to the array to the IRR function.
How do I select column 3 to pass to the Array?

CalculatedIRR = Application.WorksheetFunction.IRR(TheIRRArray(????????), .01)
 
R

RyanH

You can use this to name the used range in Col. 3, then add it to your array.
I hope this helps.


Sub LastRow()

Dim LastRow As Long
Dim myRange As Range

LastRow = Sheets("Sheet1").Cells(Rows.Count, 3).End(xlUp).Row

Set myRange = Sheets("Sheet1").Range("C1:C" & LastRow)

CalculatedIRR = Application.WorksheetFunction.IRR(TheIRRArray(myrange), .01)

End Sub
 
A

Alan Beban

Troubled said:
I am loading a five column Array with various pieces of information related
to a cashflow series. In column 3 I have the cashoutflows and inflows, which
I would then like to pass (just column 3) to the array to the IRR function.
How do I select column 3 to pass to the Array?

CalculatedIRR = Application.WorksheetFunction.IRR(TheIRRArray(????????), .01)
Col3Array=Application.Index(FiveColumnArray,0,3)

Alan Beban
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top