+ Reply to Thread
Results 1 to 7 of 7

Formula references - Referencing other tabs through auto lookups

  1. #1
    Registered User
    Join Date
    01-02-2021
    Location
    London, England
    MS-Off Ver
    Office 265 Pro Plus
    Posts
    3

    Question Formula references - Referencing other tabs through auto lookups

    Hello

    Happy New Year everyone :-)


    I have a workbook which needs to refer to a different tab each month. For example, last month, my formulas looked like this;

    e.g. =COUNTIFS(INDIRECT($A4&C$1),$B4,'Nov20'!$CT:$CT,1,'Nov20'!$CU:$CU,1,'Nov20'!CV:CV,1)

    I now need all to reference 'Dec20' rather than 'Nov 20' (there's a lot of different formulas and will take ages to manually change from 'Nov20' to 'Dec20', as well as possible human error in missing one).



    I have made a look up table for it to refer to (e.g.you can see I've tried various different ways to reference it!).

    SELECTION = data validation of the first column below. then columns 2, 3 or 4 pull through

    Apr-20 "Apr20"
    May-20 "May20"
    Jun-20 "Jun20"
    Jul-20 "Jul20"
    Aug-20 "Aug20"
    Sep-20 "sep20" Sep20 Sep20!
    Oct-20 "Oct20" Oct20 Oct20!
    Nov-20 "Nov20" Nov20 Nov20!
    Dec-20 "Dec20" Dec20 Dec20!
    Jan-21 "Jan21" Jan21 Jan21!
    Feb-21 "Feb21" Feb21 Feb21!
    Mar-21 "Mar21" Mar21 Mar21!


    I've tried referencing it to the lookup in columns 2, 3 and 4 but I keep getting errors saying there is a problem with the formula.

    Any help much appreciated!

    Thanks
    Emma
    Attached Files Attached Files
    Last edited by EH123; 01-02-2021 at 08:29 AM.

  2. #2
    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,780

    Re: Formula references - Referencing other tabs through auto lookups

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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.

  3. #3
    Registered User
    Join Date
    01-02-2021
    Location
    London, England
    MS-Off Ver
    Office 265 Pro Plus
    Posts
    3

    Re: Formula references - Referencing other tabs through auto lookups

    Thanks Ali - I think I have done now (please let me know if you can't see it!)

  4. #4
    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,780

    Re: Formula references - Referencing other tabs through auto lookups

    You'll need to use INDIRECT - in Calculator!B2:

    =COUNTIFS(INDIRECT(TEXT(Admin!A1,"mmmyy")&"!B:B"),1,INDIRECT(TEXT(Admin!A1,"mmmyy")&"!C:C")

    Correction:

    =COUNTIFS(INDIRECT(TEXT(Admin!A1,"mmmyy")&"!B:B"),1,INDIRECT(TEXT(Admin!A1,"mmmyy")&"!C:C"),1)
    Last edited by AliGW; 01-02-2021 at 09:03 AM.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,026

    Re: Formula references - Referencing other tabs through auto lookups

    Ali left a bit out at the end of her formula:

    =COUNTIFS(INDIRECT(TEXT(Admin!A1,"mmmyy")&"!B:B"),1,INDIRECT(TEXT(Admin!A1,"mmmyy")&"!C:C"),1)

    Note: if you refer to a sheet with a space in the tab name, this construction will not work. To be safe, use this, instead:

    =COUNTIFS(INDIRECT("'"&TEXT(Admin!A1,"mmmyy")&"'!B:B"),1,INDIRECT("'"&TEXT(Admin!A1,"mmmyy")&"'!C:C"),1)

    Otherwise, you may come adrift next time you try to use INDIRECT.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 01-02-2021 at 09:01 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    01-02-2021
    Location
    London, England
    MS-Off Ver
    Office 265 Pro Plus
    Posts
    3

    Re: Formula references - Referencing other tabs through auto lookups

    thank you so much :-)

  7. #7
    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,780

    Re: Formula references - Referencing other tabs through auto lookups

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Sumif and Hlookup formula referencing multiple tabs to create summary tab
    By kgilmore in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-05-2019, 03:14 PM
  2. Maintain Formula References when replacing tabs
    By maddogp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2015, 03:17 PM
  3. [SOLVED] Formula that references different tabs according to a data validation field?
    By Rizzu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-27-2012, 06:27 PM
  4. autofill a formula that references worksheet tabs
    By menziesthefish in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-29-2010, 10:50 AM
  5. Help with a formula referencing multiple tabs
    By CIP in forum Excel General
    Replies: 3
    Last Post: 09-08-2009, 10:11 AM
  6. Dragging a formula referencing multiple tabs
    By gvb in forum Excel General
    Replies: 0
    Last Post: 03-05-2008, 02:21 PM
  7. Lookups and References in relations to countA or sumproducts
    By JR573PUTT in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-15-2006, 03:55 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