Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-13-2014, 06:10 AM
persist persist is offline Define a spreadsheet range using two named variables Windows 7 Define a spreadsheet range using two named variables Office 2007
Novice
Define a spreadsheet range using two named variables
 
Join Date: Mar 2010
Posts: 8
persist is on a distinguished road
Default Define a spreadsheet range using two named variables

I am trying to build a quick and dirty way of calculating the IRR for a series of share investments.

Data
A B C
1 Share1 -1000 1/1/2012 buy
2 Share1 50 1/6/2012 dividend
3 Share1 900 1/5/2014 current value
4 Share2 -2000 4/2/2012 buy
5 Share2 60 9/9/2012 div
6 Share2 70 1/1/1013 div
7 Share2 2500 1/5/2014 current value
8 Share3 …

I copy this table of data from a query in an access database
I paste it into excel
I want the IRR for investment in each share
I do not know how many cash movements will be involved with any share



This works
IRR = XIRR(B4:B7, C4:C7, 8)
I can manually retype the range for each share1, then share2, then ...


I would like to save some of this typing

I tried the following - but it gave an error

RowFirst = 4
RowLast = 7
IRR = XIRR(B[RowFirst]:B[RowLast], C[RowFirst]:C[RowLast], 8)

Is there an easy way for me to define the cashflow range and the date range for each company one after the other

Could I use visual basic code?
From within VB there seems to only be the IRR function which is for periodic cash movements
From the spreadsheet there is XIRR that handles a series of dates and cash movements

Using ms Excel 2007
Reply With Quote
 

Tags
excel 2007, names, range

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Define a spreadsheet range using two named variables How to define restrictions to resource combination andrebmsilva Project 6 11-10-2013 03:02 PM
Referencing a named (calculated) range on a remote spreadsheet TishyMouse Excel 1 04-25-2012 08:45 AM
Excel - move with tab through named range mjlaw Excel 4 03-26-2012 10:40 AM
Define a spreadsheet range using two named variables Named range drop-down jgelpi16 Excel 1 04-08-2011 03:08 PM
Define a spreadsheet range using two named variables Is there a way to Define a common Table Format as Object? blackduck603 Word Tables 1 02-20-2009 03:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft