+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP syntax

  1. #1
    Registered User
    Join Date
    02-13-2008
    Posts
    13

    VLOOKUP syntax

    =IF($A2="","",IF(O$1="","",VLOOKUP($A2,HQA01!$A$24:$AG$525,6,FALSE)))

    The above statement works great, but when I try to replace the HQA01 (worksheet name) with a cell reference it doesn't work anymore. I want to point to the cell that has that name of the sheet in it rather than hardcode each sheet name.

    =IF($A2="","",IF(O$1="","",VLOOKUP($A2,$Q$1&"!$A$24:$AG$525",6,FALSE)))

    When I try the &, or the concatenate function it appears to put quotes around the entire result and doesn't work. It's driving me crazy. PLEASE help, I think it's just syntax...

    Thanks in advance...

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,099
    Hi,

    Does this previous post help?

    http://www.excelforum.com/showthread.php?t=632703
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    02-13-2008
    Posts
    13

    Unhappy ...did NOT work unfortunately...

    =IF($A2="","",IF(P$1="","",VLOOKUP($A2,INDIRECT(HQA01!$A$24:$AG$525),6,FALSE)))

    I tried a variety of ways, but I get a #VALUE error even when I do an INDIRECT on the full name without trying to use a cell reference.

  4. #4
    Registered User
    Join Date
    02-13-2008
    Posts
    13

    VLOOKUP using a Cell Reference as a TABLE ARRAY

    =IF($A2="","",IF(O$1="","",VLOOKUP($A2,HQA01!$A$24:$AG$525,6,FALSE)))

    The above statement works great, but when I try to replace the HQA01 (worksheet name) with a cell reference it doesn't work anymore. I want to point to the cell that has that name of the sheet in it rather than hardcode each sheet name.

    =IF($A2="","",IF(O$1="","",VLOOKUP($A2,$Q$1&"!$A$24:$AG$525",6,FALSE)))

    When I try the &, or the concatenate function it appears to put quotes around the entire result and doesn't work. It's driving me crazy. PLEASE help, I think it's just syntax...

    Thanks in advance...

  5. #5
    Registered User
    Join Date
    02-13-2008
    Posts
    13

    Thumbs up The SemiColon Was the Issue

    =IF($A2="","",IF(P$1="","",VLOOKUP($A2,INDIRECT($P$1&"!"&"$A$24"&":"&"$AG$525"),6,FALSE)))

    Resolved by a suggestion on this LINK ---
    http://en.allexperts.com/q/Excel-105...able_array.htm

  6. #6
    Registered User
    Join Date
    02-13-2008
    Posts
    13

    Thumbs up RESOLVED: SemiColon appears to be the Issue!

    =IF($A2="","",IF(P$1="","",VLOOKUP($A2,INDIRECT($P$1&"!"&"$A$24"&":"&"$AG$525"),6,FALSE)))

    Resolved by a suggestion on this LINK ---
    http://en.allexperts.com/q/Excel-105...able_array.htm

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902
    Try:

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,099
    Congratulations! - thanks for the feedback

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,099
    salfonsi

    No need to post the same question twice

    http://www.excelforum.com/showthread...88#post1882588

  10. #10
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Threads merged. Salfonsi, please don't do that.

+ 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