+ Reply to Thread
Results 1 to 4 of 4

How can I use the input in a cell to access some other worksheet

  1. #1
    Registered User
    Join Date
    10-13-2013
    Location
    Elgin. IL
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    8

    How can I use the input in a cell to access some other worksheet

    If there is a worksheet name in a cell how can that be used to access a cell in that another worksheet. In other words sheet1 cell A1 has “Sheet2” in B2 I want to get the input in cell B2 from sheet2. I know =’Sheet2’!B2 will do it but I want to use the information in cell A1. I’ve tried =”’” & A1 & “’!B2” but that only gave me the text ’Sheet2’!B2.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How can I use the input in a cell to access some other worksheet

    You use the INDIRECT() function to piece together text strings into a sheet/cell reference. Based on your example:

    =INDIRECT("'" & $A$1 & "'!B2")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: How can I use the input in a cell to access some other worksheet

    Use the INDIRECT function, like this:

    =INDIRECT("'" & A1 & "'!B2")

    The apostrophes are there in case the sheet name contains spaces.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    10-13-2013
    Location
    Elgin. IL
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    8

    Re: How can I use the input in a cell to access some other worksheet

    Thank you for the response, that worked

+ 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. Conditionally unlock worksheet based on cell input in worksheet
    By CST in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2013, 10:27 AM
  2. Replies: 0
    Last Post: 05-20-2009, 10:40 PM
  3. [SOLVED] Skip to next input cell on protected worksheet
    By Fred in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-17-2006, 09:20 AM
  4. Using cell content to access another worksheet in same workbook
    By ScubaBum in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2006, 11:40 PM
  5. [SOLVED] How do I access worksheet cell data (i.e. cell sheet1!a4) from vi.
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2005, 12:14 AM

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