+ Reply to Thread
Results 1 to 5 of 5

Referencing Worksheet from A Cell

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Referencing Worksheet from A Cell

    Is this possible?

    I have a name of a worksheet in column K.

    Below is a sippet of my code. If I change the part Ptr, "K" to an an actual name of a worksheet the code runs. However, I have the name of a sheet in the cell Ptr, "K" and it doesn't run.

    Please help. Thanks!


    Please Login or Register  to view this content.

    But this code works...
    Please Login or Register  to view this content.
    Last edited by ScabbyDog; 03-30-2014 at 10:52 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Referencing Worksheet from A Cell

    Full code if you guys need it

    Please Login or Register  to view this content.
    So i want to paste the row into the sheet name that is listed in column K on the row.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Referencing Worksheet from A Cell

    Hi, ScabbyDog,

    reason maybe that you try and create a range object but want to refer to the entire range thereafter on basis of a sinlgle value

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Referencing Worksheet from A Cell

    Excellent HaHoBe.

    Greatly appreciated.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Referencing Worksheet from A Cell

    Hi, ScabbyDog,

    please revert the loop to start at the bottom and work up like
    Please Login or Register  to view this content.
    because otherwise the row counter may skip rows when going down as the row number has already been checked.

    Ciao,
    Holger

+ 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. Replies: 1
    Last Post: 03-08-2014, 06:16 AM
  2. [SOLVED] Referencing a cell from another worksheet in VBA
    By a-man in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2014, 08:32 AM
  3. Referencing a cell on another worksheet in VBA
    By kthoma85 in forum Excel General
    Replies: 5
    Last Post: 11-30-2013, 03:49 AM
  4. Referencing same cell on different worksheet
    By archipelago in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2008, 10:10 AM
  5. Referencing a cell from another worksheet
    By Mark in forum Excel General
    Replies: 3
    Last Post: 01-27-2006, 05:55 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