+ Reply to Thread
Results 1 to 10 of 10

How to keep vlookup constant after changing tabs

  1. #1
    Registered User
    Join Date
    12-11-2015
    Location
    United States
    MS-Off Ver
    MS Office 2010
    Posts
    4

    How to keep vlookup constant after changing tabs

    *I am using a VLook to find data from a different tab and put it into a chart. Everyday i insert a new updated tab ( with the same name, and i would need the same range from) that i need to use the vlookup on. Is there anyway that i can somehow put something else in the formula that searches for the tab so i don't have to redo the formula every time i insert the new tab


    This is the formula i'm currently using

    =IFERROR(VLOOKUP(D7,Sheet5!$A$6:$D$194,3,FALSE),0)


    I need away to search within the vlookup for the tab then do the specified range every time without manually doing it

    I think it has something to do with putting something before the specified sheet but i cant figure out what


    This is what it looks like when i put the new tab in

    =IFERROR(VLOOKUP(D7,'C:\Users\mdoto\Documents\SJG\[12.9 Credit Report.xlsx]Sheet7'!$A$7:$D$25,3,FALSE),0)

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,903

    Re: How to keep vlookup constant after changing tabs

    Try this ...

    =IFERROR(VLOOKUP(D7,INDIRECT("'" & D1 & "'!$A$6:$D$194"),3,FALSE),0)

    D1=Tab name

    Is this what you mean?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: How to keep vlookup constant after changing tabs

    A very minor point - if you use INDIRECT, you dont need to absolute the ranges in it, they are essentially text...
    =IFERROR(VLOOKUP(D7,INDIRECT("'" & D1 & "'!A6:D194"),3,FALSE),0)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to keep vlookup constant after changing tabs

    So your data is on sheet "data" and then you want to change the name of that tab (or delete it?) and create a new tab named "data" and you want your vlookup to now look at this new sheet? Or do you want it to look at the renamed sheet (now called "data1" or whatever)?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    12-11-2015
    Location
    United States
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Re: How to keep vlookup constant after changing tabs

    So i have this =IFERROR(VLOOKUP(D7,Sheet7!$A$7:$D$25,3,FALSE),0) formula in one of the cells. the range that i use for that formula comes from a different tab (Sheet7!$A$7:$D$25 comes from another tab on the excel sheet) . So everyday i replace the tab (sheet 7) that i get the range from with a new tab that i import and call it the same thing. I dont want to have to redo the formula everyday so i need to be able for he vlookup to search the tabs on the excel sheet and find sheet 7 and then include the range that i specify (which is the same everyday)

    I dont know how to upload a picture or i would

  6. #6
    Registered User
    Join Date
    12-11-2015
    Location
    United States
    MS-Off Ver
    MS Office 2010
    Posts
    4
    This is what it looks like...summary is the tab where I'm doing the vlookup
    And sheet 7 is where the range for the vlookup is
    Everyday I replace sheet 7 with another new sheet 7
    This causes the vlookup in the summary tab to stop working, cause its directly linked
    Is there a way for the vlookup to search for the tab name and then do the specified range
    Attached Images Attached Images
    Last edited by Michael Doto; 12-11-2015 at 01:09 PM.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to keep vlookup constant after changing tabs

    John and Ford's formulas should work for you (replacing D1 with sheet 7

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: How to keep vlookup constant after changing tabs

    Did you try the suggested formulas yet?

  9. #9
    Registered User
    Join Date
    12-11-2015
    Location
    United States
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Re: How to keep vlookup constant after changing tabs

    Sorry for the delayed response, it wasn't working at first than i realized that i just needed to put " " around sheet7 for it to work. Thank you guys very much for the help!!!!!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: How to keep vlookup constant after changing tabs

    Awesome, happy to help

+ 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] display cell value using a constant column but a changing row value
    By Papa Hog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2015, 05:36 PM
  2. Replies: 1
    Last Post: 06-18-2014, 02:46 PM
  3. Replies: 5
    Last Post: 09-05-2012, 10:52 AM
  4. VBA changing Rows while keeping the columns constant
    By tmd2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-10-2011, 04:12 PM
  5. Constant Letters Before a Changing Number in a Column
    By LaurenSmalley in forum Excel General
    Replies: 1
    Last Post: 03-26-2010, 01:52 PM
  6. Changing a constant
    By achidsey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-02-2006, 07:30 PM
  7. changing formula result to constant value
    By pemily in forum Excel General
    Replies: 5
    Last Post: 12-08-2005, 05:44 PM

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