LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Can I do this with arrays?

Never mind! When I dropped this into the macro I was using to test my
"trials and errors", I reassigned all the variables in your code to match my
code - except
myCount = myCount - 1
so when I reached
ReDim Preserve Arr2(1 To myCount)
which now reads
ReDim Preserve Arr2(1 To z)
it didn't work as you designed. With the *correct* variable, though, it
works great!

Thanks again!
Ed

(PS - I'm using this to resolve an issue from an earlier post of mine: how
to create a range that excludes another range ("How to exclude certain cells
from a range?", posted 1/9/2006 - http://tinyurl.com/78vt8)

"Ed" wrote in message
...
I put the Option Base 1 in as a matter of course - it's too much extra

work
for me to remember to subtract 1! <g

I did notice that the revised array (Arr2) is still as large as before -
that is, UBound before and after are the same. Going from Tom's response,
I'm assuming this is because some value positions are now "" or null, but
are still there. I must have missed something in your code when I
transposed it into mine. If I find it, I'll let you know.

Ed

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Beautiful, Bernie! Thank you!!


You're welcome.

I forgot to mention that the code, as written, requires

Option Base 1

at the top of the module.

HTH,
Bernie
MS Excel MVP






 
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
Arrays Abdul Shakeel Excel Worksheet Functions 1 December 12th 08 10:24 AM
Arrays Tobro88 Excel Discussion (Misc queries) 3 November 18th 05 11:28 PM
Help with arrays please Gary[_18_] Excel Programming 6 June 27th 04 08:29 PM
Arrays JAmes L Excel Programming 3 April 21st 04 11:00 AM
Arrays Aaron Cooper Excel Programming 2 April 14th 04 07:42 PM


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