+ Reply to Thread
Results 1 to 5 of 5

Reference a range in another sheet

  1. #1
    Registered User
    Join Date
    11-23-2016
    Location
    Greece
    MS-Off Ver
    2016
    Posts
    7

    Reference a range in another sheet

    I have a userform where the user can input the desired worksheet to search (representing the year) and the name of a company to search and the active worksheet is a "Report" worksheet. I can't find a way to tell VBA to search that specific worksheet range... Have the following code and any help would be appreciated!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,011

    Re: Reference a range in another sheet

    Try changing this:
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-23-2016
    Location
    Greece
    MS-Off Ver
    2016
    Posts
    7

    Re: Reference a range in another sheet

    Hi TMS, thank you for your reply, but unfortunately I get the following error on the above line "Run-time error 1004 method range of object worksheet failed"

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Reference a range in another sheet

    Perhaps this will help
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Registered User
    Join Date
    11-23-2016
    Location
    Greece
    MS-Off Ver
    2016
    Posts
    7

    Re: Reference a range in another sheet

    Working fine! That looks easy! thank you for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy/Paste cell range from sheet 1 to sheet 2 in numbers match in reference columns.
    By trickedout in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-23-2016, 07:44 PM
  2. Controlling a cell range reference from another sheet
    By Kymba in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-16-2016, 09:58 AM
  3. [SOLVED] Reference a dynamic range on another sheet and do something if it is blank
    By BeachRock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 01:22 PM
  4. [SOLVED] Excel Macro to lookup sheet name with a range of cells and paste in the reference sheet
    By mishaq in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-08-2013, 02:55 PM
  5. [SOLVED] Dynamic Range Reference to Another Sheet
    By jasperhuang93 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-20-2012, 09:49 AM
  6. Reference Range for Sheet Names
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2008, 02:58 PM
  7. reference range in other sheet
    By Diana in forum Excel General
    Replies: 1
    Last Post: 07-12-2006, 12:35 PM

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