+ Reply to Thread
Results 1 to 5 of 5

Formual with Tab Name obtained from A Cell

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Derby, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Formual with Tab Name obtained from A Cell

    I have a workbook that has multiple tabs each with a team members name.

    I have an additional tab that is summary tab that pulls together all of the data from the individuals tabs with the team member names in column B.

    I am using the formula =IF(Stuart!B$3="","",Stuart!B$3) to copy data from the team members tab. Is there anyway I can write the formula so that it determines which tab to look in by referencing a cell in column B on the summary sheet with the tab name in?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formual with Tab Name obtained from A Cell

    Something like this...

    A1 = some sheet name like Stuart.

    Then, the formula would be:

    =IF(INDIRECT(A1&"!B3")="","",INDIRECT(A1&"!B3"))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-22-2013
    Location
    Derby, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formual with Tab Name obtained from A Cell

    Tony, thank you for the quick reply. So you solution does exactly what I asked for but it turns out I didn't ask for everything I require.

    So I have used your formula in column C row 3 of my summary tab referencing column B row 3 which is the tab name =IF(INDIRECT($B3&"!B3")="","",INDIRECT($B3&"!B3")) and this gives me exactly what I expect. However when I copy it to column D I want it to read =IF(INDIRECT($B3&"!C3")="","",INDIRECT($B3&"!C3")) but it doesn't auto update to the next column, it still looks at cell B3 on the named tab. is it possible to write the formula in such a way that is would do this and continue on along the columns

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formual with Tab Name obtained from A Cell

    Try

    =IF(INDIRECT($B3&"!"&CELL("address",B3))="","",INDIRECT($B3&"!"&CELL("address",B3)))

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formual with Tab Name obtained from A Cell

    Try it like this with a caveat:

    =IF(INDIRECT($B3&"!"&CELL("address",B3))="","",INDIRECT($B3&"!"&CELL("address",B3)))

    The caveat being that there is no "bulletproof" way to increment cell references within the INDIRECT function.

    If you were to insert a new column A on the sheet where this formula resides then the reference to CELL("address",B3) would change to CELL("address",C3) which could lead to incorrect results.

+ 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. [SOLVED] Formual to find any cell not a number
    By Jietoh in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-08-2016, 12:21 PM
  2. [SOLVED] Need blank cell instead of #ERROR in DATEDIF formual
    By unley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2013, 04:03 AM
  3. Replies: 2
    Last Post: 03-07-2012, 03:16 PM
  4. Need formual for Highest Cell
    By tirthasarathi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-04-2010, 07:33 AM
  5. Cell/Formual problem
    By Fausto in forum Excel General
    Replies: 2
    Last Post: 01-22-2007, 07:04 AM
  6. formual to transfer data to next non-blank cell
    By nancy dearth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-06-2006, 08:47 PM
  7. freezing data in a cell which was obtained using a formula
    By Joe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2006, 05:10 PM

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