Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Create an array of separate cells

Hi all,

I would like to know how I can create an array of 1 column with cells
that are not in order, that contains the data that is in cell A1, C3,
and E5. And use that array created in the formula FVSCHEDULE.

Something like this: "FVSCHEDULE (principal, MyArray (A1, C3, E5))"

Please excuse my English.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Create an array of separate cells

On Wed, 21 Mar 2012 20:12:29 -0700 (PDT), Rickemil wrote:

Hi all,

I would like to know how I can create an array of 1 column with cells
that are not in order, that contains the data that is in cell A1, C3,
and E5. And use that array created in the formula FVSCHEDULE.

Something like this: "FVSCHEDULE (principal, MyArray (A1, C3, E5))"

Please excuse my English.


You can do this with a simple User Defined Function:

To enter this User Defined Function (UDF), <alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.

To use this User Defined Function (UDF), enter a formula like

=FVSCHEDULE(principal,MyArray(A1,C3,E5))

in some cell.

======================================
Option Explicit
Function MyArray(ParamArray Schedule() As Variant) As Variant
MyArray = Schedule
End Function
===========================
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Create an array of separate cells

On 22 mar, 07:23, Ron Rosenfeld wrote:
On Wed, 21 Mar 2012 20:12:29 -0700 (PDT), Rickemil wrote:
Hi all,


I would like to know how I can create an array of 1 column with cells
that are not in order, that contains the data that is in cell A1, C3,
and E5. And use that array created in the formula FVSCHEDULE.


Something like this: "FVSCHEDULE (principal, MyArray (A1, C3, E5))"


Please excuse my English.


You can do this with a simple User Defined Function:

To enter this User Defined Function (UDF), <alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.

To use this User Defined Function (UDF), enter a formula like

=FVSCHEDULE(principal,MyArray(A1,C3,E5))

*in some cell.

======================================
Option Explicit
Function MyArray(ParamArray Schedule() As Variant) As Variant
*MyArray = Schedule
End Function
===========================


Thank you so much,

My respect for you.

Excuse me Ron, could you recommend me something (BOOK, WEB) to learn
VBA from beginner, intermediate to advanced.

Thanks Again.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Create an array of separate cells

On Thu, 22 Mar 2012 07:39:33 -0700 (PDT), Rickemil wrote:

Thank you so much,

My respect for you.

Excuse me Ron, could you recommend me something (BOOK, WEB) to learn
VBA from beginner, intermediate to advanced.

Thanks Again.


Glad to help. And no, I don't know of any resources such as you describe for learning VBA. My personal learning evolved over many years, mostly by trial and error.
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
separate two dates from a text string into two separate cells Tacrier Excel Discussion (Misc queries) 3 October 13th 08 08:53 PM
How can I create a link between cells in two separate Excel sheet Dawnmarie Excel Worksheet Functions 1 April 18th 06 06:34 PM
insert elemnts from cells into array, create a userform with values checkboxes usadream[_8_] Excel Programming 0 March 31st 06 04:30 PM
How can I create an array formula for non-sequential cells Sue Excel Worksheet Functions 7 May 21st 05 02:32 PM
Select an array of cells and paste to separate worksheet - 2nd post - 1st didn't work!! Lee Wold[_2_] Excel Programming 1 February 10th 04 03:22 PM


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