+ Reply to Thread
Results 1 to 7 of 7

LOOKUP function (2) questions

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Denver, CO
    MS-Off Ver
    Office 2007
    Posts
    4

    LOOKUP function (2) questions

    Question 1: I'm looking up something on worksheet '1' ---- Is there a way to have the worksheet substituted by a formula?

    Cell D8=INDEX('1'!$A$8:$U$1999, MATCH($A7,'1'!$A$8:$A$1999,), MATCH("TOTAL",'1'!$A$8:$U$8,)) I tried 'D$5' with D5=1
    Cell E8=INDEX('2'!$A$8:$U$1999, MATCH($A7,'2'!$A$8:$A$1999,), MATCH("TOTAL",'2'!$A$8:$U$8,)) I tried 'E$5' with E5=2




    Question 2: Is there a shorter way to avoid getting an #N/A for the answer? Currently I'm using this:

    =IF(ISERROR(INDEX('1'!$A$8:$U$1999, MATCH($A8,'1'!$A$8:$A$1999,), MATCH("TOTAL",'1'!$A$8:$U$8,)))=TRUE,0,INDEX('1'!$A$8:$U$1999, MATCH($A8,'1'!$A$8:$A$1999,), MATCH("TOTAL",'1'!$A$8:$U$8,)))


    Thanks

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: LOOKUP function (2) questions

    For question 2, you can use IFERROR

    =IFERROR(INDEX('1'!$A$8:$U$1999, MATCH($A7,'1'!$A$8:$A$1999,), MATCH("TOTAL",'1'!$A$8:$U$8,)),0)

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LOOKUP function (2) questions

    1
    =index(indirect("'"&d5&"'!$a$8:$u$1999"),match($a7,indirect("'"&d5&"'!$a$8:$a$1999"),0),match("total",indirect("'"&d5&"'!$a$8:$u$8"),0))
    2
    =iferror(index('1'!$a$8:$u$1999,match($a8,'1'!$a$8:$a$1999,0),match("total",'1'!$a$8:$u$8,0)),"")
    im not sure why you used
    ,match("total",'1'!$a$8:$u$8,)the correct syntax is
    ,match("total",'1'!$a$8:$u$8,0) finds exact match
    Last edited by martindwilson; 09-10-2013 at 05:25 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    09-10-2013
    Location
    Denver, CO
    MS-Off Ver
    Office 2007
    Posts
    4

    Re: LOOKUP function (2) questions

    Thank you Jonmo1 and Martin

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: LOOKUP function (2) questions

    Quote Originally Posted by martindwilson View Post
    im not sure why you used
    ,match("total",'1'!$a$8:$u$8,)as that needs sorted data whereas
    ,match("total",'1'!$a$8:$u$8,0) finds exact match
    Actually,
    match("total",'1'!$a$8:$u$8,)
    Is actually doing Exact Match
    The 3rd argument is not actually omitted, notice the comma
    Not sure exactly, but I think that makes the 3rd argument a Null, which is then considered 0.

    This is omitted
    match("total",'1'!$a$8:$u$8)
    Which would then become the "closest match"
    Last edited by Jonmo1; 09-10-2013 at 05:26 PM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LOOKUP function (2) questions

    yep i know hence my edit,but its usually best to do what the help file says

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: LOOKUP function (2) questions

    Quote Originally Posted by martindwilson View Post
    but its usually best to do what the help file says
    Agreed.

+ 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. Function formula questions
    By Jayhawk45 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2012, 01:49 AM
  2. Index/ Match/ Lookup questions
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-05-2012, 09:57 PM
  3. LOOKUP questions
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-03-2012, 07:13 PM
  4. What function do i use for these questions?
    By m00jo in forum Excel General
    Replies: 3
    Last Post: 12-14-2011, 11:27 PM
  5. Function Questions
    By Alleyezonme1148 in forum Excel General
    Replies: 2
    Last Post: 06-28-2010, 02:36 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