+ Reply to Thread
Results 1 to 4 of 4

.Range cant take long argument

  1. #1
    Registered User
    Join Date
    02-08-2008
    Posts
    2

    Talking .Range cant take long argument

    Hi all,

    I have written a VB script that goes like this

    Please Login or Register  to view this content.
    Problem appears when I tried to assign currentRange, because the averageRangeString goes terribly long. The content looks like: D2, D5,D8 up to D101, D104,D107..
    I guess Range cant take that long string argument..

    Any suggestion, how can i avoid assigning string to that Range?
    Last edited by VBA Noob; 02-11-2008 at 03:40 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Bit short on time at the moment, but have a look at the UNION function. Use SET to establish a rng object, and UNION to include the additional cells into that range. Then you can use the formulas on the rng object.

    If you can't make sense of that, do a search on the site for UNION and see if any examples of code come up.

    HTH

    rylo

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Back again.

    Try this
    Please Login or Register  to view this content.
    rylo

  4. #4
    Registered User
    Join Date
    02-08-2008
    Posts
    2
    thanks rylo.

    That works

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1