VB Array - Select column

  • Thread starter Thread starter Troubled User
  • Start date Start date
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)
 
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
 
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
 
Back
Top