Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Variable length array that exludes (possible) blanks in the middle

Hi,
I am trying to automate some formula's to prevent having to manually
adjustment them every time the sheet is used but encountered a problem when
it came to a varriable length array where it is possible to have blanks in
the middle of the array that need to be exluded.

To help set the scene a bit:
* The formulas I am haing trouble with are NPV and IRR calcualtions that
link to the reuslts of various other formulas.

What I have done so far:
* defined the row with the cashflows as a named range using an offset
formula combined with a countif <0 so that the width of the array can varry
automatically. A copy is below:
=OFFSET('Advance Purchase Economics'!$D$31:$K$31,0,0,1,COUNTIF('Advance
Purchase Economics'!$D$31:$K$31,"<0"))
Where cells D31:k31 contain the cashflow results
* The problem is the cashflow results could have a value in cell D31, but
E31 could be blank, and F31 has a value.

My offset formula doesn't work in this situation. If I include all cashflow
cells the IRR appears to works till but the NPV calculation does not. I need
to be able to only include cells have values in them.

NPV formula:
=NPV(IRate_PY/12,Cashflows)+C31
IRate_PY = interest rate percentage per year.

Does anyone have any advice on how to fix the formula?

Thanks in advance to anyone who can help!!
Emma
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Variable length array that exludes (possible) blanks in the middle

IGNORE - SORTED OUT
"Emma" wrote:

Hi,
I am trying to automate some formula's to prevent having to manually
adjustment them every time the sheet is used but encountered a problem when
it came to a varriable length array where it is possible to have blanks in
the middle of the array that need to be exluded.

To help set the scene a bit:
* The formulas I am haing trouble with are NPV and IRR calcualtions that
link to the reuslts of various other formulas.

What I have done so far:
* defined the row with the cashflows as a named range using an offset
formula combined with a countif <0 so that the width of the array can varry
automatically. A copy is below:
=OFFSET('Advance Purchase Economics'!$D$31:$K$31,0,0,1,COUNTIF('Advance
Purchase Economics'!$D$31:$K$31,"<0"))
Where cells D31:k31 contain the cashflow results
* The problem is the cashflow results could have a value in cell D31, but
E31 could be blank, and F31 has a value.

My offset formula doesn't work in this situation. If I include all cashflow
cells the IRR appears to works till but the NPV calculation does not. I need
to be able to only include cells have values in them.

NPV formula:
=NPV(IRate_PY/12,Cashflows)+C31
IRate_PY = interest rate percentage per year.

Does anyone have any advice on how to fix the formula?

Thanks in advance to anyone who can help!!
Emma

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
Variable Axis Length Krys Charts and Charting in Excel 2 July 1st 08 08:19 PM
Return a Variable value length Sean Excel Worksheet Functions 5 December 4th 06 09:25 PM
how do I do a variable length array based on the value in a cell Mark Pranger Excel Discussion (Misc queries) 1 January 25th 06 07:01 AM
Sum a Column of Variable length Chris G Excel Discussion (Misc queries) 4 November 7th 05 12:25 PM
Sum a column of variable length? Brian Excel Discussion (Misc queries) 5 February 3rd 05 02:26 PM


All times are GMT +1. The time now is 10:56 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"