Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Get value of cell from variable sheet and variable cell

  1. #1
    New Member
    Join Date
    Nov 2012
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Get value of cell from variable sheet and variable cell

    Is there a way to do this?

    Sheet1
    Column A contains names of other sheets
    Column B contains a cell address (A10, E38, etc.)

    I want Column C to display the contents of the cell (indicated in Column B) that is on the sheet indicated by Column A.

  2. #2
    Board Regular
    Join Date
    Mar 2012
    Posts
    951
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Get value of cell from variable sheet and variable cell

    =indirect(a1&"!"&b1)

    note, you might need "'"&....&"'!"&... depending on your sheet names.

  3. #3
    MrExcel MVP VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,651
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)

    Default Re: Get value of cell from variable sheet and variable cell

    Try

    =INDIRECT("'"&A1&"'!"&B1)
    HTH, Peter
    Please test any code on a copy of your workbook.

  4. #4
    MrExcel MVP Jonmo1's Avatar
    Join Date
    Oct 2006
    Location
    Bryan, TX
    Posts
    44,054
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Get value of cell from variable sheet and variable cell

    You can use Indirect for that

    Try
    =INDIRECT("'"&A2&"'!"&B2)
    Use the MrExcel HTML Maker to post nicely formatted tables in your forum posts.
    Find a link in post number 31

    The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious.

    Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.
    Ferris Bueller A.K.A. John Hughes, 1986

  5. #5
    New Member
    Join Date
    Nov 2012
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Get value of cell from variable sheet and variable cell

    That's a winner. Thanks so much guys!

    Quote Originally Posted by jonmo1 View Post
    You can use Indirect for that

    Try
    =INDIRECT("'"&A2&"'!"&B2)

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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