+ Reply to Thread
Results 1 to 4 of 4

How to correct INDIRECT using VLOOKUP

  1. #1
    Registered User
    Join Date
    05-06-2008
    Posts
    31

    How to correct INDIRECT using VLOOKUP

    I have several worksheets by week to week for bowling results.
    Every week I would have to copy previous week worksheet to new worksheet and name it, eg. 1st worksheet called 'Week1', 2nd worksheet called 'Week2' and so on.

    I have several VLOOKUP on each worksheet that each will look previous week worksheet using worksheet name. See Red Text below that I want to change....

    FOR EG...
    =VLOOKUP(A7,Week2!$A$286:$J$313,5)

    See red text above (Week2) when I copied the previous week (Week2) to new worksheet (Week3) but the VLOOKUP still shows as Week2 I have to change every VLOOKUP to Week3 and so on for every week.
    TOO MUCH WORK TO DO THIS SO...

    I am trying to correct the VLOOKUP using INDIRECT see below (something like this), but I couldn't get the code right can you help.

    =VLOOKUP(A7,INDIRECT("Week"&RIGHT($A$3,LEN($A$3)-5)-1&!$A$286:$J$313,5))
    (Note: In cell A3 = Week 3 as current week for example)

    Thank you for your help.
    Last edited by holiday4ever; 07-01-2009 at 09:05 AM.

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

    Re: How to correct INDIRECT using VLOOKUP

    Try this
    Please Login or Register  to view this content.
    Does that work?
    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

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: How to correct INDIRECT using VLOOKUP

    Try this?

    =VLOOKUP(A7,INDIRECT("Week"&RIGHT($A$3,LEN($A$3)-5)-1&"!$A$286:$J$313"),5)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Registered User
    Join Date
    05-06-2008
    Posts
    31

    Re: How to correct INDIRECT using VLOOKUP

    Problem solved...big thanks to ChemistB and Sweep for prompt reply. Sweep got the right code, many thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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