Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Function query

Hi

I am writing an excel function in VBA for calculating Future Value of a
selected range, where 1st cell is year1 and 2nd cell is year 2 and so on(i
know already there is in built function for FV, but i need this as part of
larger function i am writing)

My code starts as follows:
Public Function FutureValue(Rate As Double, CashFlow As Range) As Double

CashFlow is selected as a range which can be any number of cells (say 5 or
10 or 20,etc). Now i need to know how many cells have been selected. I tried
using Ubound(CashFlow) but that returns an error.

Please help, its urgent!!

Thanks a lot


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Function query

Hi,

Number of cell within a range: CashFlow.Cells.Count
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Rahul" wrote:

Hi

I am writing an excel function in VBA for calculating Future Value of a
selected range, where 1st cell is year1 and 2nd cell is year 2 and so on(i
know already there is in built function for FV, but i need this as part of
larger function i am writing)

My code starts as follows:
Public Function FutureValue(Rate As Double, CashFlow As Range) As Double

CashFlow is selected as a range which can be any number of cells (say 5 or
10 or 20,etc). Now i need to know how many cells have been selected. I tried
using Ubound(CashFlow) but that returns an error.

Please help, its urgent!!

Thanks a lot


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Function query

It works:-)
Thanks a ton!!


"sebastienm" wrote:

Hi,

Number of cell within a range: CashFlow.Cells.Count
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Rahul" wrote:

Hi

I am writing an excel function in VBA for calculating Future Value of a
selected range, where 1st cell is year1 and 2nd cell is year 2 and so on(i
know already there is in built function for FV, but i need this as part of
larger function i am writing)

My code starts as follows:
Public Function FutureValue(Rate As Double, CashFlow As Range) As Double

CashFlow is selected as a range which can be any number of cells (say 5 or
10 or 20,etc). Now i need to know how many cells have been selected. I tried
using Ubound(CashFlow) but that returns an error.

Please help, its urgent!!

Thanks a lot


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
query about VALUE function gvm Excel Worksheet Functions 1 August 9th 05 12:58 AM
Function: New Web Query vinrouge Links and Linking in Excel 2 July 2nd 05 04:54 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM
mid function in ms query suhair Excel Discussion (Misc queries) 1 February 24th 05 04:51 PM
Excel Web Query Function Steven Baroni Excel Programming 3 December 8th 03 10:49 PM


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