LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Building/Creating an Array

Rich Cooper wrote:

Thanks for the help

One last question, i have done that now i want to insert a value at the very
end of the array. I want it to me a sheet call demog. So in the end my
array will be (mkt1, mkt2....demog) Can i use ubound to do that and if so
how? I greatly appreciate all the help.

The number of elements in a one-dimensional array, myArray, is

UBound(myArray) - LBound(myArray) + 1

regardless of whether the lower bound is 0, 1 or something else.

To add another element you can use

Redim Preserve myArray(UBound(myArray) + 1)
myArray(UBound(myArray)) = "demog"

Alan Beban
 
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
Creating a list of value from an array Moanster Excel Worksheet Functions 2 June 20th 07 04:22 PM
creating an array Richard New Users to Excel 4 March 15th 07 01:06 PM
creating an array Richard Excel Worksheet Functions 4 March 15th 07 01:06 PM
Creating array formulaes in macro Raj Excel Discussion (Misc queries) 1 April 28th 05 09:20 AM
Creating an array Eric[_6_] Excel Programming 1 January 12th 04 08:25 PM


All times are GMT +1. The time now is 06:38 AM.

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

About Us

"It's about Microsoft Excel"