Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default XIRR Add-ins

I am looking to reference a named range in a spreadsheet
that has the following columns & rows. This range can
expand and contract. I want to have a button on a
separate sheet reference the range and display the IRR?

Date Deposit/Withdrawal
12/31/2002 -1000
02/08/2002 275
04/25/2002 425
05/21/2002 325
09/13/2002 275


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default XIRR Add-ins

I am looking to reference a named range in a spreadsheet
that has the following columns & rows. This range can
expand and contract. I want to have a button on a
separate sheet reference the range and display the IRR?

Date Deposit/Withdrawal
12/31/2002 -1000
02/08/2002 275
04/25/2002 425
05/21/2002 325
09/13/2002 275


I didn't get it to work using a named range, but maybe
the following will suffice. Suppose the data will remain
on Sheet2 in cells A1:B_ and the CommandButton on
Sheet1. Then the following code will put the XIRR
in B5 of Sheet1.

Private Sub CommandButton1_Click()
Dim iRow As Integer

iRow = Sheets("Sheet2").Range("B65536").End(xlUp).Row
Sheets("Sheet1").Range("B5").FormulaR1C1 = _
"=XIRR(Sheet2!R[-3]C:R[" & iRow - 5 & _
"]C,Sheet2!R[-3]C[-1]:R[" & iRow - 5 & "]C[-1],0.2)"
End Sub

By the way, I changed 12/31/02 to 12/31/01 to get XIRR to
work, and XIRR can't be called directly from VBA.

HTH,
Merjet




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
xirr Janven Excel Worksheet Functions 3 September 21st 08 11:02 PM
XIRR Jami Excel Discussion (Misc queries) 3 August 11th 07 05:25 AM
To XIRR or Not To XIRR Jonathan Excel Worksheet Functions 3 May 17th 06 03:13 PM
Xirr? Robo Excel Discussion (Misc queries) 3 April 20th 06 05:42 PM
XIRR and IRR Dan Excel Worksheet Functions 2 May 13th 05 03:20 AM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"