+ Reply to Thread
Results 1 to 3 of 3

Refer to correct sheet via other cell in formula

  1. #1
    Registered User
    Join Date
    10-25-2016
    Location
    Antwerp, Belgium
    MS-Off Ver
    2007
    Posts
    4

    Refer to correct sheet via other cell in formula

    Hi all,

    I' like to automatically refer to the correct data sheet with the name of the sheet in another cell.


    So,
    =GETPIVOTDATA("SALES";'PIVOT 2015'!$A$3;"COUNTRY";"BELGIUM")
    becomes something like
    =GETPIVOTDATA("SALES";B5;"COUNTRY";"BELGIUM")
    where cell B5 contains the text: 'PIVOT 2015'!$A$3

    It does not work now, I suppose the content of cell B5 is not correct at the moment.

    Is this possible?
    I want to do this because othwerwise I'll have to link the pivot again for every column(every column needs data from another pivot table, which are in a different sheets)

    I hope this is possible
    Thanks a lot!

  2. #2
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Refer to correct sheet via other cell in formula

    Can you post a sample workbook?

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Refer to correct sheet via other cell in formula

    Like this:

    =GETPIVOTDATA("SALES";INDIRECT("'"&B5&"'!$A$3");"COUNTRY";"BELGIUM")
    where cell B5 contains the text: 'PIVOT 2015'!$A$3
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Formula to select correct sheet cell
    By keen2xl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2014, 05:37 PM
  2. [SOLVED] script to selecting correct sheet calculated via cell formula
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2013, 09:42 AM
  3. Replies: 7
    Last Post: 12-16-2012, 04:24 PM
  4. [SOLVED] Drag Formula to every other cell but refer to consecutive columns in another sheet
    By mariejulia in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-02-2012, 06:44 AM
  5. Replies: 2
    Last Post: 05-05-2011, 04:59 PM
  6. looking for the correct sheet and fill in the value refer to date
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2010, 04:17 AM
  7. Refer to formula in another sheet
    By Jonsson in forum Excel General
    Replies: 5
    Last Post: 12-08-2005, 09:15 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