+ Reply to Thread
Results 1 to 20 of 20

multiple ranges on Vlookup

  1. #1
    lpj
    Guest

    multiple ranges on Vlookup

    I currently have my Vlookup stmnt as this:

    =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))

    'Code Decrip' is the name of the worksheet
    I need to add another range X$3:Y48
    What is the proper syntax - I wasnt able to get it right after searching
    online for it.
    Thanks so much.

  2. #2
    Kassie
    Guest

    RE: multiple ranges on Vlookup

    Hi lpj

    Not quite clear what you want to achieve here?

    Why not have everything in the same range?

    Am I correct in guessing that, if you do not find a matching record in the
    primary range, you then want to do a lookup in the secondary range? If so,
    you will have to use an If(OR( statement, to first look at the primary range,
    and then, if you do not find anything there, do a VLOOKUP in the secondary
    range. You will therefore have to test the primary range for an error
    condition, and if the error condition exists, then look at the secondary
    range, else look at the primary range. Again, why not put the whole lot in
    one range?

    --
    [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa


    "lpj" wrote:

    > I currently have my Vlookup stmnt as this:
    >
    > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    >
    > 'Code Decrip' is the name of the worksheet
    > I need to add another range X$3:Y48
    > What is the proper syntax - I wasnt able to get it right after searching
    > online for it.
    > Thanks so much.


  3. #3
    lpj
    Guest

    RE: multiple ranges on Vlookup

    Thanks for the reply! The reason I can't put it all in the same range is bc
    this is an existing worksheet (which can't be modified) and there are some
    columns of data in btwn that shouldn't be referrenced - they could create
    duplicates or give invalid results back.

    "Kassie" wrote:

    > Hi lpj
    >
    > Not quite clear what you want to achieve here?
    >
    > Why not have everything in the same range?
    >
    > Am I correct in guessing that, if you do not find a matching record in the
    > primary range, you then want to do a lookup in the secondary range? If so,
    > you will have to use an If(OR( statement, to first look at the primary range,
    > and then, if you do not find anything there, do a VLOOKUP in the secondary
    > range. You will therefore have to test the primary range for an error
    > condition, and if the error condition exists, then look at the secondary
    > range, else look at the primary range. Again, why not put the whole lot in
    > one range?
    >
    > --
    > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    >
    >
    > "lpj" wrote:
    >
    > > I currently have my Vlookup stmnt as this:
    > >
    > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > >
    > > 'Code Decrip' is the name of the worksheet
    > > I need to add another range X$3:Y48
    > > What is the proper syntax - I wasnt able to get it right after searching
    > > online for it.
    > > Thanks so much.


  4. #4
    lpj
    Guest

    RE: multiple ranges on Vlookup

    Duplicates or invalid values - to say the value of the lookup field could
    exist in 2 cells (i.e. T3 and V3, I would only want the returned value for
    T3 NOT V3). that's why i can't have an one entire range


    "Kassie" wrote:

    > Hi lpj
    >
    > Not quite clear what you want to achieve here?
    >
    > Why not have everything in the same range?
    >
    > Am I correct in guessing that, if you do not find a matching record in the
    > primary range, you then want to do a lookup in the secondary range? If so,
    > you will have to use an If(OR( statement, to first look at the primary range,
    > and then, if you do not find anything there, do a VLOOKUP in the secondary
    > range. You will therefore have to test the primary range for an error
    > condition, and if the error condition exists, then look at the secondary
    > range, else look at the primary range. Again, why not put the whole lot in
    > one range?
    >
    > --
    > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    >
    >
    > "lpj" wrote:
    >
    > > I currently have my Vlookup stmnt as this:
    > >
    > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > >
    > > 'Code Decrip' is the name of the worksheet
    > > I need to add another range X$3:Y48
    > > What is the proper syntax - I wasnt able to get it right after searching
    > > online for it.
    > > Thanks so much.


  5. #5
    Kassie
    Guest

    RE: multiple ranges on Vlookup

    Hi lpj

    Try the following formula:

    =IF(E2="","",IF(ISERROR(VLOOKUP('Code
    Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))

    --
    [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa


    "lpj" wrote:

    > Thanks for the reply! The reason I can't put it all in the same range is bc
    > this is an existing worksheet (which can't be modified) and there are some
    > columns of data in btwn that shouldn't be referrenced - they could create
    > duplicates or give invalid results back.
    >
    > "Kassie" wrote:
    >
    > > Hi lpj
    > >
    > > Not quite clear what you want to achieve here?
    > >
    > > Why not have everything in the same range?
    > >
    > > Am I correct in guessing that, if you do not find a matching record in the
    > > primary range, you then want to do a lookup in the secondary range? If so,
    > > you will have to use an If(OR( statement, to first look at the primary range,
    > > and then, if you do not find anything there, do a VLOOKUP in the secondary
    > > range. You will therefore have to test the primary range for an error
    > > condition, and if the error condition exists, then look at the secondary
    > > range, else look at the primary range. Again, why not put the whole lot in
    > > one range?
    > >
    > > --
    > > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    > >
    > >
    > > "lpj" wrote:
    > >
    > > > I currently have my Vlookup stmnt as this:
    > > >
    > > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > >
    > > > 'Code Decrip' is the name of the worksheet
    > > > I need to add another range X$3:Y48
    > > > What is the proper syntax - I wasnt able to get it right after searching
    > > > online for it.
    > > > Thanks so much.


  6. #6
    Domenic
    Guest

    Re: multiple ranges on Vlookup

    Try...

    =IF(E2<>"",VLOOKUP(E2,IF(ISNUMBER(MATCH(E2,'Code
    Descrip'!T3:T27,0)),'Code Descrip'!T3:U27,'Code Descrip'!X3:Y48),2,0),"")

    Hope this helps!

    In article <[email protected]>,
    lpj <[email protected]> wrote:

    > I currently have my Vlookup stmnt as this:
    >
    > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    >
    > 'Code Decrip' is the name of the worksheet
    > I need to add another range X$3:Y48
    > What is the proper syntax - I wasnt able to get it right after searching
    > online for it.
    > Thanks so much.


  7. #7
    L. Howard Kittle
    Guest

    Re: multiple ranges on Vlookup

    Hi Kassis,

    I this a typo on the first line?

    >=IF(E2="","",IF(ISERROR(VLOOKUP('Code
    >Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    >Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))


    Should be

    =IF(E2="","",IF(ISERROR(VLOOKUP(E2,'Code
    etc...

    Regards,
    Howard

    "lpj" <[email protected]> wrote in message
    news:[email protected]...
    >I currently have my Vlookup stmnt as this:
    >
    > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    >
    > 'Code Decrip' is the name of the worksheet
    > I need to add another range X$3:Y48
    > What is the proper syntax - I wasnt able to get it right after searching
    > online for it.
    > Thanks so much.




  8. #8
    lpj
    Guest

    RE: multiple ranges on Vlookup

    Thanks so much - to all of you! I really appreciate it!

    "Kassie" wrote:

    > Hi lpj
    >
    > Try the following formula:
    >
    > =IF(E2="","",IF(ISERROR(VLOOKUP('Code
    > Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    > Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    >
    > --
    > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    >
    >
    > "lpj" wrote:
    >
    > > Thanks for the reply! The reason I can't put it all in the same range is bc
    > > this is an existing worksheet (which can't be modified) and there are some
    > > columns of data in btwn that shouldn't be referrenced - they could create
    > > duplicates or give invalid results back.
    > >
    > > "Kassie" wrote:
    > >
    > > > Hi lpj
    > > >
    > > > Not quite clear what you want to achieve here?
    > > >
    > > > Why not have everything in the same range?
    > > >
    > > > Am I correct in guessing that, if you do not find a matching record in the
    > > > primary range, you then want to do a lookup in the secondary range? If so,
    > > > you will have to use an If(OR( statement, to first look at the primary range,
    > > > and then, if you do not find anything there, do a VLOOKUP in the secondary
    > > > range. You will therefore have to test the primary range for an error
    > > > condition, and if the error condition exists, then look at the secondary
    > > > range, else look at the primary range. Again, why not put the whole lot in
    > > > one range?
    > > >
    > > > --
    > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    > > >
    > > >
    > > > "lpj" wrote:
    > > >
    > > > > I currently have my Vlookup stmnt as this:
    > > > >
    > > > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > > >
    > > > > 'Code Decrip' is the name of the worksheet
    > > > > I need to add another range X$3:Y48
    > > > > What is the proper syntax - I wasnt able to get it right after searching
    > > > > online for it.
    > > > > Thanks so much.


  9. #9
    lpj
    Guest

    Re: multiple ranges on Vlookup

    Thanks so much - to all of you! I really appreciate it!

    "Domenic" wrote:

    > Try...
    >
    > =IF(E2<>"",VLOOKUP(E2,IF(ISNUMBER(MATCH(E2,'Code
    > Descrip'!T3:T27,0)),'Code Descrip'!T3:U27,'Code Descrip'!X3:Y48),2,0),"")
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > lpj <[email protected]> wrote:
    >
    > > I currently have my Vlookup stmnt as this:
    > >
    > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > >
    > > 'Code Decrip' is the name of the worksheet
    > > I need to add another range X$3:Y48
    > > What is the proper syntax - I wasnt able to get it right after searching
    > > online for it.
    > > Thanks so much.

    >


  10. #10
    lpj
    Guest

    Re: multiple ranges on Vlookup

    Thanks so much - to all of you! I really appreciate it!

    "L. Howard Kittle" wrote:

    > Hi Kassis,
    >
    > I this a typo on the first line?
    >
    > >=IF(E2="","",IF(ISERROR(VLOOKUP('Code
    > >Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    > >Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))

    >
    > Should be
    >
    > =IF(E2="","",IF(ISERROR(VLOOKUP(E2,'Code
    > etc...
    >
    > Regards,
    > Howard
    >
    > "lpj" <[email protected]> wrote in message
    > news:[email protected]...
    > >I currently have my Vlookup stmnt as this:
    > >
    > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > >
    > > 'Code Decrip' is the name of the worksheet
    > > I need to add another range X$3:Y48
    > > What is the proper syntax - I wasnt able to get it right after searching
    > > online for it.
    > > Thanks so much.

    >
    >
    >


  11. #11
    lpj
    Guest

    RE: multiple ranges on Vlookup

    How would i nest another 1 or 2 ranges in there? I'm looking at this syntax
    but not getting very far - can i use 'or' operators? thanks again for your
    help!


    "Kassie" wrote:

    > Hi lpj
    >
    > Try the following formula:
    >
    > =IF(E2="","",IF(ISERROR(VLOOKUP('Code
    > Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    > Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    >
    > --
    > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    >
    >
    > "lpj" wrote:
    >
    > > Thanks for the reply! The reason I can't put it all in the same range is bc
    > > this is an existing worksheet (which can't be modified) and there are some
    > > columns of data in btwn that shouldn't be referrenced - they could create
    > > duplicates or give invalid results back.
    > >
    > > "Kassie" wrote:
    > >
    > > > Hi lpj
    > > >
    > > > Not quite clear what you want to achieve here?
    > > >
    > > > Why not have everything in the same range?
    > > >
    > > > Am I correct in guessing that, if you do not find a matching record in the
    > > > primary range, you then want to do a lookup in the secondary range? If so,
    > > > you will have to use an If(OR( statement, to first look at the primary range,
    > > > and then, if you do not find anything there, do a VLOOKUP in the secondary
    > > > range. You will therefore have to test the primary range for an error
    > > > condition, and if the error condition exists, then look at the secondary
    > > > range, else look at the primary range. Again, why not put the whole lot in
    > > > one range?
    > > >
    > > > --
    > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South Africa
    > > >
    > > >
    > > > "lpj" wrote:
    > > >
    > > > > I currently have my Vlookup stmnt as this:
    > > > >
    > > > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > > >
    > > > > 'Code Decrip' is the name of the worksheet
    > > > > I need to add another range X$3:Y48
    > > > > What is the proper syntax - I wasnt able to get it right after searching
    > > > > online for it.
    > > > > Thanks so much.


  12. #12
    Domenic
    Guest

    Re: multiple ranges on Vlookup

    Assuming that T3:U27, X3:Y48, AB3:AC27, and AF3:AG48 contain your
    tables, try...

    =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,8,12}
    ,{25,46,25,46}),E2)>0,0),T3:U27,X3:Y48,AB3:AC27,AF3:AG48),2,0),"")

    ....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Note that the
    first array constant...

    {0,4,8,12}

    ....determines the number of columns to move right from Column T for each
    table, and the second array constant...

    {25,46,25,46}

    ....determines the number of rows contained in each table. Change these
    accordingly. Post back if you need further help...

    In article <[email protected]>,
    lpj <[email protected]> wrote:

    > How would i nest another 1 or 2 ranges in there? I'm looking at this syntax
    > but not getting very far - can i use 'or' operators? thanks again for your
    > help!
    >
    >
    > "Kassie" wrote:
    >
    > > Hi lpj
    > >
    > > Try the following formula:
    > >
    > > =IF(E2="","",IF(ISERROR(VLOOKUP('Code
    > > Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    > > Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > >
    > > --
    > > [email protected]ve_2nd_at. Stilfontein, Northwest, South
    > > Africa
    > >
    > >
    > > "lpj" wrote:
    > >
    > > > Thanks for the reply! The reason I can't put it all in the same range is
    > > > bc
    > > > this is an existing worksheet (which can't be modified) and there are
    > > > some
    > > > columns of data in btwn that shouldn't be referrenced - they could create
    > > > duplicates or give invalid results back.
    > > >
    > > > "Kassie" wrote:
    > > >
    > > > > Hi lpj
    > > > >
    > > > > Not quite clear what you want to achieve here?
    > > > >
    > > > > Why not have everything in the same range?
    > > > >
    > > > > Am I correct in guessing that, if you do not find a matching record in
    > > > > the
    > > > > primary range, you then want to do a lookup in the secondary range? If
    > > > > so,
    > > > > you will have to use an If(OR( statement, to first look at the primary
    > > > > range,
    > > > > and then, if you do not find anything there, do a VLOOKUP in the
    > > > > secondary
    > > > > range. You will therefore have to test the primary range for an error
    > > > > condition, and if the error condition exists, then look at the
    > > > > secondary
    > > > > range, else look at the primary range. Again, why not put the whole
    > > > > lot in
    > > > > one range?
    > > > >
    > > > > --
    > > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South
    > > > > Africa
    > > > >
    > > > >
    > > > > "lpj" wrote:
    > > > >
    > > > > > I currently have my Vlookup stmnt as this:
    > > > > >
    > > > > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > > > >
    > > > > > 'Code Decrip' is the name of the worksheet
    > > > > > I need to add another range X$3:Y48
    > > > > > What is the proper syntax - I wasnt able to get it right after
    > > > > > searching
    > > > > > online for it.
    > > > > > Thanks so much.


  13. #13
    lpj
    Guest

    Re: multiple ranges on Vlookup

    HI Domenic -
    unfortunately i still can't get this working, even with my modifications. I
    don't receive an error msg just doesn't find a match (N/A#). My table ranges
    are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    This is the statement, after the modifications:

    =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")

    P.S. You stated you hit CTL,Shift, Enter - what is this for?
    Thanks so much!

    "Domenic" wrote:

    > Assuming that T3:U27, X3:Y48, AB3:AC27, and AF3:AG48 contain your
    > tables, try...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,8,12}
    > ,{25,46,25,46}),E2)>0,0),T3:U27,X3:Y48,AB3:AC27,AF3:AG48),2,0),"")
    >
    > ....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Note that the
    > first array constant...
    >
    > {0,4,8,12}
    >
    > ....determines the number of columns to move right from Column T for each
    > table, and the second array constant...
    >
    > {25,46,25,46}
    >
    > ....determines the number of rows contained in each table. Change these
    > accordingly. Post back if you need further help...
    >
    > In article <[email protected]>,
    > lpj <[email protected]> wrote:
    >
    > > How would i nest another 1 or 2 ranges in there? I'm looking at this syntax
    > > but not getting very far - can i use 'or' operators? thanks again for your
    > > help!
    > >
    > >
    > > "Kassie" wrote:
    > >
    > > > Hi lpj
    > > >
    > > > Try the following formula:
    > > >
    > > > =IF(E2="","",IF(ISERROR(VLOOKUP('Code
    > > > Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    > > > Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > >
    > > > --
    > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South
    > > > Africa
    > > >
    > > >
    > > > "lpj" wrote:
    > > >
    > > > > Thanks for the reply! The reason I can't put it all in the same range is
    > > > > bc
    > > > > this is an existing worksheet (which can't be modified) and there are
    > > > > some
    > > > > columns of data in btwn that shouldn't be referrenced - they could create
    > > > > duplicates or give invalid results back.
    > > > >
    > > > > "Kassie" wrote:
    > > > >
    > > > > > Hi lpj
    > > > > >
    > > > > > Not quite clear what you want to achieve here?
    > > > > >
    > > > > > Why not have everything in the same range?
    > > > > >
    > > > > > Am I correct in guessing that, if you do not find a matching record in
    > > > > > the
    > > > > > primary range, you then want to do a lookup in the secondary range? If
    > > > > > so,
    > > > > > you will have to use an If(OR( statement, to first look at the primary
    > > > > > range,
    > > > > > and then, if you do not find anything there, do a VLOOKUP in the
    > > > > > secondary
    > > > > > range. You will therefore have to test the primary range for an error
    > > > > > condition, and if the error condition exists, then look at the
    > > > > > secondary
    > > > > > range, else look at the primary range. Again, why not put the whole
    > > > > > lot in
    > > > > > one range?
    > > > > >
    > > > > > --
    > > > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South
    > > > > > Africa
    > > > > >
    > > > > >
    > > > > > "lpj" wrote:
    > > > > >
    > > > > > > I currently have my Vlookup stmnt as this:
    > > > > > >
    > > > > > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > > > > >
    > > > > > > 'Code Decrip' is the name of the worksheet
    > > > > > > I need to add another range X$3:Y48
    > > > > > > What is the proper syntax - I wasnt able to get it right after
    > > > > > > searching
    > > > > > > online for it.
    > > > > > > Thanks so much.

    >


  14. #14
    lpj
    Guest

    Re: multiple ranges on Vlookup

    just wanted to add - i looked up ctl+sht_enter (array enter the formula), and
    i did do this - i noticed after doing so my formula was within brackets - but
    still getting not getting the results expected (unless the value is null,
    then i get null which i want). Thanks.

    "Domenic" wrote:

    > Assuming that T3:U27, X3:Y48, AB3:AC27, and AF3:AG48 contain your
    > tables, try...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,8,12}
    > ,{25,46,25,46}),E2)>0,0),T3:U27,X3:Y48,AB3:AC27,AF3:AG48),2,0),"")
    >
    > ....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Note that the
    > first array constant...
    >
    > {0,4,8,12}
    >
    > ....determines the number of columns to move right from Column T for each
    > table, and the second array constant...
    >
    > {25,46,25,46}
    >
    > ....determines the number of rows contained in each table. Change these
    > accordingly. Post back if you need further help...
    >
    > In article <[email protected]>,
    > lpj <[email protected]> wrote:
    >
    > > How would i nest another 1 or 2 ranges in there? I'm looking at this syntax
    > > but not getting very far - can i use 'or' operators? thanks again for your
    > > help!
    > >
    > >
    > > "Kassie" wrote:
    > >
    > > > Hi lpj
    > > >
    > > > Try the following formula:
    > > >
    > > > =IF(E2="","",IF(ISERROR(VLOOKUP('Code
    > > > Descrip'!T$3:U$27,0,FALSE)),VLOOKUP(E2,'Code
    > > > Descrip'!X$3:Y$48,2,FALSE),VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > >
    > > > --
    > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South
    > > > Africa
    > > >
    > > >
    > > > "lpj" wrote:
    > > >
    > > > > Thanks for the reply! The reason I can't put it all in the same range is
    > > > > bc
    > > > > this is an existing worksheet (which can't be modified) and there are
    > > > > some
    > > > > columns of data in btwn that shouldn't be referrenced - they could create
    > > > > duplicates or give invalid results back.
    > > > >
    > > > > "Kassie" wrote:
    > > > >
    > > > > > Hi lpj
    > > > > >
    > > > > > Not quite clear what you want to achieve here?
    > > > > >
    > > > > > Why not have everything in the same range?
    > > > > >
    > > > > > Am I correct in guessing that, if you do not find a matching record in
    > > > > > the
    > > > > > primary range, you then want to do a lookup in the secondary range? If
    > > > > > so,
    > > > > > you will have to use an If(OR( statement, to first look at the primary
    > > > > > range,
    > > > > > and then, if you do not find anything there, do a VLOOKUP in the
    > > > > > secondary
    > > > > > range. You will therefore have to test the primary range for an error
    > > > > > condition, and if the error condition exists, then look at the
    > > > > > secondary
    > > > > > range, else look at the primary range. Again, why not put the whole
    > > > > > lot in
    > > > > > one range?
    > > > > >
    > > > > > --
    > > > > > [email protected]ve_2nd_at. Stilfontein, Northwest, South
    > > > > > Africa
    > > > > >
    > > > > >
    > > > > > "lpj" wrote:
    > > > > >
    > > > > > > I currently have my Vlookup stmnt as this:
    > > > > > >
    > > > > > > =IF(E2="","",VLOOKUP(E2,'Code Descrip'!T$3:U$27,2,FALSE))
    > > > > > >
    > > > > > > 'Code Decrip' is the name of the worksheet
    > > > > > > I need to add another range X$3:Y48
    > > > > > > What is the proper syntax - I wasnt able to get it right after
    > > > > > > searching
    > > > > > > online for it.
    > > > > > > Thanks so much.

    >


  15. #15
    Domenic
    Guest

    Re: multiple ranges on Vlookup

    The formula should be as follows...

    =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,9,14}
    ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")

    If you have no other data below your tables and you want to use whole
    column references, use the following formula instead...

    =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T:U,,{0,4,9,14}),E
    2)>0,0),T:U,X:Y,AC:AD,AH:AI),2,0),"")

    Both these formulas need to be confirmed with CONTROL+SHIFT+ENTER, not
    just ENTER. In other words, after typing the formula, instead of
    pressing just ENTER, hold the CONTROL+SHIFT keys down and while those
    two keys are pressed down press ENTER. Excel will automatically place
    braces {} around the formula which will indicate that you've entered it
    correctly.

    In article <[email protected]>,
    lpj <[email protected]> wrote:

    > HI Domenic -
    > unfortunately i still can't get this working, even with my modifications. I
    > don't receive an error msg just doesn't find a match (N/A#). My table ranges
    > are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    > This is the statement, after the modifications:
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    >
    > P.S. You stated you hit CTL,Shift, Enter - what is this for?
    > Thanks so much!


  16. #16
    lpj
    Guest

    Re: multiple ranges on Vlookup

    i dont know - still having problems - could this be bc the name of the sheet
    these tables are on is no longer in the formula? 'Code Descrip'? because
    where this formula is going is not on that sht (code descrip). thanks so muxh
    for all your help.

    "Domenic" wrote:

    > The formula should be as follows...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,9,14}
    > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    >
    > If you have no other data below your tables and you want to use whole
    > column references, use the following formula instead...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T:U,,{0,4,9,14}),E
    > 2)>0,0),T:U,X:Y,AC:AD,AH:AI),2,0),"")
    >
    > Both these formulas need to be confirmed with CONTROL+SHIFT+ENTER, not
    > just ENTER. In other words, after typing the formula, instead of
    > pressing just ENTER, hold the CONTROL+SHIFT keys down and while those
    > two keys are pressed down press ENTER. Excel will automatically place
    > braces {} around the formula which will indicate that you've entered it
    > correctly.
    >
    > In article <[email protected]>,
    > lpj <[email protected]> wrote:
    >
    > > HI Domenic -
    > > unfortunately i still can't get this working, even with my modifications. I
    > > don't receive an error msg just doesn't find a match (N/A#). My table ranges
    > > are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    > > This is the statement, after the modifications:
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > >
    > > P.S. You stated you hit CTL,Shift, Enter - what is this for?
    > > Thanks so much!

    >


  17. #17
    lpj
    Guest

    Re: multiple ranges on Vlookup

    Yea - that is def. the issue - not having the sheet name in the formula (bc i
    tested it - putting the lookup info on the same sheet) - how would i go about
    getting it in the formula? i looked at our previous posts but not getting far
    as the formula (and its syntax) has changed quite some. thanks again!


    "Domenic" wrote:

    > The formula should be as follows...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,9,14}
    > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    >
    > If you have no other data below your tables and you want to use whole
    > column references, use the following formula instead...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T:U,,{0,4,9,14}),E
    > 2)>0,0),T:U,X:Y,AC:AD,AH:AI),2,0),"")
    >
    > Both these formulas need to be confirmed with CONTROL+SHIFT+ENTER, not
    > just ENTER. In other words, after typing the formula, instead of
    > pressing just ENTER, hold the CONTROL+SHIFT keys down and while those
    > two keys are pressed down press ENTER. Excel will automatically place
    > braces {} around the formula which will indicate that you've entered it
    > correctly.
    >
    > In article <[email protected]>,
    > lpj <[email protected]> wrote:
    >
    > > HI Domenic -
    > > unfortunately i still can't get this working, even with my modifications. I
    > > don't receive an error msg just doesn't find a match (N/A#). My table ranges
    > > are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    > > This is the statement, after the modifications:
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > >
    > > P.S. You stated you hit CTL,Shift, Enter - what is this for?
    > > Thanks so much!

    >


  18. #18
    lpj
    Guest

    Re: multiple ranges on Vlookup

    got it on my own - thanks for all of your help!


    "Domenic" wrote:

    > The formula should be as follows...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,9,14}
    > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    >
    > If you have no other data below your tables and you want to use whole
    > column references, use the following formula instead...
    >
    > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T:U,,{0,4,9,14}),E
    > 2)>0,0),T:U,X:Y,AC:AD,AH:AI),2,0),"")
    >
    > Both these formulas need to be confirmed with CONTROL+SHIFT+ENTER, not
    > just ENTER. In other words, after typing the formula, instead of
    > pressing just ENTER, hold the CONTROL+SHIFT keys down and while those
    > two keys are pressed down press ENTER. Excel will automatically place
    > braces {} around the formula which will indicate that you've entered it
    > correctly.
    >
    > In article <[email protected]>,
    > lpj <[email protected]> wrote:
    >
    > > HI Domenic -
    > > unfortunately i still can't get this working, even with my modifications. I
    > > don't receive an error msg just doesn't find a match (N/A#). My table ranges
    > > are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    > > This is the statement, after the modifications:
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > >
    > > P.S. You stated you hit CTL,Shift, Enter - what is this for?
    > > Thanks so much!

    >


  19. #19
    Domenic
    Guest

    Re: multiple ranges on Vlookup

    Sorry! I forgot about the sheet reference. But I'm glad you've got it
    sorted out.

    Cheers!

    In article <[email protected]>,
    lpj <[email protected]> wrote:

    > got it on my own - thanks for all of your help!
    >
    >
    > "Domenic" wrote:
    >
    > > The formula should be as follows...
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,9,14}
    > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > >
    > > If you have no other data below your tables and you want to use whole
    > > column references, use the following formula instead...
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T:U,,{0,4,9,14}),E
    > > 2)>0,0),T:U,X:Y,AC:AD,AH:AI),2,0),"")
    > >
    > > Both these formulas need to be confirmed with CONTROL+SHIFT+ENTER, not
    > > just ENTER. In other words, after typing the formula, instead of
    > > pressing just ENTER, hold the CONTROL+SHIFT keys down and while those
    > > two keys are pressed down press ENTER. Excel will automatically place
    > > braces {} around the formula which will indicate that you've entered it
    > > correctly.
    > >
    > > In article <[email protected]>,
    > > lpj <[email protected]> wrote:
    > >
    > > > HI Domenic -
    > > > unfortunately i still can't get this working, even with my modifications.
    > > > I
    > > > don't receive an error msg just doesn't find a match (N/A#). My table
    > > > ranges
    > > > are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    > > > This is the statement, after the modifications:
    > > >
    > > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    > > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > > >
    > > > P.S. You stated you hit CTL,Shift, Enter - what is this for?
    > > > Thanks so much!

    > >


  20. #20
    Domenic
    Guest

    Re: multiple ranges on Vlookup

    Sorry! I forgot about the sheet reference. But I'm glad you've got it
    sorted out.

    Cheers!

    In article <[email protected]>,
    lpj <[email protected]> wrote:

    > got it on my own - thanks for all of your help!
    >
    >
    > "Domenic" wrote:
    >
    > > The formula should be as follows...
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,9,14}
    > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > >
    > > If you have no other data below your tables and you want to use whole
    > > column references, use the following formula instead...
    > >
    > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T:U,,{0,4,9,14}),E
    > > 2)>0,0),T:U,X:Y,AC:AD,AH:AI),2,0),"")
    > >
    > > Both these formulas need to be confirmed with CONTROL+SHIFT+ENTER, not
    > > just ENTER. In other words, after typing the formula, instead of
    > > pressing just ENTER, hold the CONTROL+SHIFT keys down and while those
    > > two keys are pressed down press ENTER. Excel will automatically place
    > > braces {} around the formula which will indicate that you've entered it
    > > correctly.
    > >
    > > In article <[email protected]>,
    > > lpj <[email protected]> wrote:
    > >
    > > > HI Domenic -
    > > > unfortunately i still can't get this working, even with my modifications.
    > > > I
    > > > don't receive an error msg just doesn't find a match (N/A#). My table
    > > > ranges
    > > > are: T3:U27, X3:Y48, AC3:AD134, AH3:AI69
    > > > This is the statement, after the modifications:
    > > >
    > > > =IF(E2<>"",VLOOKUP(E2,CHOOSE(MATCH(TRUE,COUNTIF(OFFSET(T3:U27,,{0,4,5,5}
    > > > ,{25,46,132,67}),E2)>0,0),T3:U27,X3:Y48,AC3:AD134,AH3:AI69),2,0),"")
    > > >
    > > > P.S. You stated you hit CTL,Shift, Enter - what is this for?
    > > > Thanks so much!

    > >


+ 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