+ Reply to Thread
Results 1 to 6 of 6

If Statement the vlookup across three sheets

  1. #1
    Registered User
    Join Date
    01-25-2010
    Location
    BURTON ON TRENT, UK
    MS-Off Ver
    Excel 2003
    Posts
    34

    If Statement the vlookup across three sheets

    Hi Forum,

    I would like some help with what should be a quick fix.

    in J11 I have a drop down box with options 1 2 3

    What Im try to get is if J11=1 then vlookup from "Dealer Benchmarking visit 1" sheet
    J11=2 then vlookup from "Dealer Benchmarking visit 2" sheet
    J11=3 then vlookup from "Dealer Benchmarking visit 3" sheet

    I have tried :

    =IFERROR(VLOOKUP($J11,'Dealer Benchmarking Visit 1'!$A$3:$C$3,3,FALSE),IFERROR(VLOOKUP($J11,'Dealer Benchmarking Visit 2 '!$A$3:$C$3,3,FALSE),VLOOKUP($J11,'Dealer Benchmarking Visit 3'!$A$3:$C$3,3,FALSE)))

    The result I get is #N/A

    Any suggestions?

  2. #2
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: If Statement the vlookup across three sheets

    You can just use INDIRECT in the vlookup but I can remember how to get it to work sorry, will update once I get it right if someone else doesn't beat me to it.
    Last edited by Harribone; 03-08-2013 at 05:22 PM.
    Say thanks, click *

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

    Re: If Statement the vlookup across three sheets

    Okay, so if J11 =1 lookup on table in Visit 1", if 2 lookup on table in "Visit 2" and if 3, lookup on Table from "Visit 3" and the value you want to lookup is the same value you are using to determine which table to look it up on (1,2, or 3)???
    Your tables on each of these sheets only include a single row (A3:C3) and you are always returning the value in C3 (according to your formulas)

    You can use =INDIRECT("'Dealer Benchmarking Visit "&J11&"'!C3")
    Would that work for you?
    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

  4. #4
    Registered User
    Join Date
    01-25-2010
    Location
    BURTON ON TRENT, UK
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: If Statement the vlookup across three sheets

    ChemistB

    thanks for that but when I paste =INDIRECT("'Dealer Benchmarking Visit "&J11&"'!C3")

    I get a #ref in my results cell

  5. #5
    Registered User
    Join Date
    01-25-2010
    Location
    BURTON ON TRENT, UK
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: If Statement the vlookup across three sheets

    Thanks Harribone,

    I wait in anticipation

  6. #6
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: If Statement the vlookup across three sheets

    ChemistB's solution should work. You will get #REF if J11 is blank or contains any value which is not 1,2 or 3 as these are the only conditions the formula will work.
    To get around this use =IFERROR(INDIRECT("'Dealer Benchmarking Visit "&J11&"'!C3"),"") which will leave the cell blank in conditions.

+ 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