+ Reply to Thread
Results 1 to 3 of 3

Placing range into variable from function

  1. #1
    Forum Contributor
    Join Date
    12-20-2006
    Posts
    127

    Placing range into variable from function

    I have the following formula which returns a cell range.

    =INDIRECT("Data!$D$2:$G$"&(65536-(COUNTBLANK(Overall!$A:$A))))

    This works when defined using (ctrl+F3)

    I would like however to put this into a variable in VB

    The following doesnt seem to work

    Let myrange =INDIRECT("Data!$D$2:$G$"&(65536-(COUNTBLANK(Overall!$A:$A))))

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    If you really wanted to do it with these parameters then maybe you could use:

    Please Login or Register  to view this content.
    When assingning object references, you need to use the Set keyowrd, not Let.

    Hope this helps!

    Richard

  3. #3
    Forum Contributor
    Join Date
    12-20-2006
    Posts
    127

    Thank

    Many thanks for your help got it working

+ 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