LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Array element

Depends on whether i want to resize the array or not. Delete would imply
that but is not definitive. Resizing, as you know, but maybe the OP
doesn't, would require that the array be dynamic. Looping with hard coded
bounds would imply fixed - but again, specifics were not provided.

--
Regards,
Tom Ogilvy

"Alan Beban" wrote in message
...
Tom Ogilvy wrote:
a P Daulton has implied, there is no command to delete an element of an
array.

j = 1
for primat = 1 to 50
if newarr(primat) < 15 then
newarr(j) = newarr(primat)
j = j + 1
end if
Next
for i = j to 50
newarr(i) = 0
Next

might be what you want.


If you substitute the following for the second loop you probably have it:

ReDim Preserve newarr(1 To j - 1)

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
Counting Array element asingh Excel Worksheet Functions 4 April 12th 10 03:30 PM
Can one store a string in a Array element? [email protected] Excel Discussion (Misc queries) 1 April 17th 07 12:53 PM
Search array and return element No Ron Excel Worksheet Functions 7 May 17th 06 05:27 AM
Permutations of an array element < to a value Bruce Excel Worksheet Functions 3 January 31st 06 04:00 PM
deleting array element michael Excel Programming 0 December 18th 03 08:55 PM


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