Results 1 to 5 of 5

Using VBA to Reference a Dynamic Range based on Last Cell of an Adjacent Column

Threaded View

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    3

    Using VBA to Reference a Dynamic Range based on Last Cell of an Adjacent Column

    Hello,

    I am currently trying to refer to a cell range defined as being from Cell K2 down to the same row as the last cell in Column J (e.g. If the last cell in Column J is J1455, the range would be "K2:K1455").

    I have tried using the following syntax but keep getting an error (Runtime Error 1004: Method 'Range' of object '_Worksheet' failed):

    Set rMonthRng = Sheet2.Range("J2", Range("J65536").End(xlUp)).Offset(0, 1)
    I don't understand this as I have used the same structure previously in other workbooks and it worked fine.

    Is anyone able to explain to me what I am doing wrong?

    Thank you!
    Last edited by PW11; 07-23-2014 at 01:39 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dynamic averaging based on adjacent column.
    By projectatpel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-20-2013, 02:21 PM
  2. [SOLVED] Dynamic averaging based on adjacent column.
    By projectatpel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2013, 12:58 PM
  3. Dynamic range column reference
    By tuna666 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-17-2013, 04:42 AM
  4. Identify a range based on adjacent column....
    By Alex_Sal in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-25-2013, 07:56 AM
  5. Selecting range based on adjacent column
    By yaju1120 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2007, 10:41 AM

Tags for this Thread

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