Microsoft® Excel® based database addin

 

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Richard Guest

    Default looking up a value only if it returns a value in another list

    I have two data tables in Excel 2007.
    Table A holds a bill of materials with parent and child parts laid out
    suitable for use with vlookup.
    Table B holds a selected list of raw materials which are child parts.

    I want to lookup a parent part from a cell and search for one of its child
    parts in table A if the result of the search matches one of the raw materials
    in table B.

    I can do simple vlookups but this is outside my knowledge.
    Can anyone please point me in the right direction?
    Thanks

    --
    Richard

  2. #2
    T. Valko Guest

    Default Re: looking up a value only if it returns a value in another list

    Can you post a small example and the expected result?

    --
    Biff
    Microsoft Excel MVP


    "Richard" <Richard@discussions.microsoft.com> wrote in message
    news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    >I have two data tables in Excel 2007.
    > Table A holds a bill of materials with parent and child parts laid out
    > suitable for use with vlookup.
    > Table B holds a selected list of raw materials which are child parts.
    >
    > I want to lookup a parent part from a cell and search for one of its child
    > parts in table A if the result of the search matches one of the raw
    > materials
    > in table B.
    >
    > I can do simple vlookups but this is outside my knowledge.
    > Can anyone please point me in the right direction?
    > Thanks
    >
    > --
    > Richard




  3. #3
    Richard Guest

    Default Re: looking up a value only if it returns a value in another list

    bill of material;
    parent child child child
    widget1 nylon carton1 tape
    widget2 rubber carton2 film

    list of acceptable values
    nylon
    rubber

    if the result of looking up a cell with widget1 returns a value which is in
    the list of acceptable values, return value, if not return "error"

    So the first cell with the formula would be targeted to return an acceptable
    value from a list of raw materials such as nylon or rubber say.
    Another cell would then have a similar formula but with say an acceptable
    value concerning cartons.

    Each set of child parts would only ever contain one raw material in the
    acceptable value list, never multiples.

    The database is extracted using Microsoft Query from a stock control program.
    There are about 4500 parent parts and upto a maximum of 8 child parts per
    parent.

    Thanks, hope this gives you an idea of what I am stuck on.
    (Is there a way I can post a spreadsheet example if this explanation is not
    clear)
    Best regards
    --
    Richard


    "T. Valko" wrote:

    > Can you post a small example and the expected result?
    >
    > --
    > Biff
    > Microsoft Excel MVP
    >
    >
    > "Richard" <Richard@discussions.microsoft.com> wrote in message
    > news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    > >I have two data tables in Excel 2007.
    > > Table A holds a bill of materials with parent and child parts laid out
    > > suitable for use with vlookup.
    > > Table B holds a selected list of raw materials which are child parts.
    > >
    > > I want to lookup a parent part from a cell and search for one of its child
    > > parts in table A if the result of the search matches one of the raw
    > > materials
    > > in table B.
    > >
    > > I can do simple vlookups but this is outside my knowledge.
    > > Can anyone please point me in the right direction?
    > > Thanks
    > >
    > > --
    > > Richard

    >
    >
    > .
    >


  4. #4
    T. Valko Guest

    Default Re: looking up a value only if it returns a value in another list

    If I understand what you want, try this...

    This data in the range A23 -

    >widget1 nylon carton1 tape
    >widget2 rubber carton2 film


    A10 = parent lookup value = widget1

    B10:B11 = list of acceptable values

    Enter this formula in C10 and copy down to C11:

    =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")

    --
    Biff
    Microsoft Excel MVP


    "Richard" <Richard@discussions.microsoft.com> wrote in message
    news:F4DEADC7-2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    > bill of material;
    > parent child child child
    > widget1 nylon carton1 tape
    > widget2 rubber carton2 film
    >
    > list of acceptable values
    > nylon
    > rubber
    >
    > if the result of looking up a cell with widget1 returns a value which is
    > in
    > the list of acceptable values, return value, if not return "error"
    >
    > So the first cell with the formula would be targeted to return an
    > acceptable
    > value from a list of raw materials such as nylon or rubber say.
    > Another cell would then have a similar formula but with say an acceptable
    > value concerning cartons.
    >
    > Each set of child parts would only ever contain one raw material in the
    > acceptable value list, never multiples.
    >
    > The database is extracted using Microsoft Query from a stock control
    > program.
    > There are about 4500 parent parts and upto a maximum of 8 child parts per
    > parent.
    >
    > Thanks, hope this gives you an idea of what I am stuck on.
    > (Is there a way I can post a spreadsheet example if this explanation is
    > not
    > clear)
    > Best regards
    > --
    > Richard
    >
    >
    > "T. Valko" wrote:
    >
    >> Can you post a small example and the expected result?
    >>
    >> --
    >> Biff
    >> Microsoft Excel MVP
    >>
    >>
    >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    >> news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    >> >I have two data tables in Excel 2007.
    >> > Table A holds a bill of materials with parent and child parts laid out
    >> > suitable for use with vlookup.
    >> > Table B holds a selected list of raw materials which are child parts.
    >> >
    >> > I want to lookup a parent part from a cell and search for one of its
    >> > child
    >> > parts in table A if the result of the search matches one of the raw
    >> > materials
    >> > in table B.
    >> >
    >> > I can do simple vlookups but this is outside my knowledge.
    >> > Can anyone please point me in the right direction?
    >> > Thanks
    >> >
    >> > --
    >> > Richard

    >>
    >>
    >> .
    >>




  5. #5
    Richard Guest

    Default Re: looking up a value only if it returns a value in another list

    Thank you very much for that.
    I will try it out and let you know how I get on.
    Much appreciated
    --
    Richard


    "T. Valko" wrote:

    > If I understand what you want, try this...
    >
    > This data in the range A23 -
    >
    > >widget1 nylon carton1 tape
    > >widget2 rubber carton2 film

    >
    > A10 = parent lookup value = widget1
    >
    > B10:B11 = list of acceptable values
    >
    > Enter this formula in C10 and copy down to C11:
    >
    > =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")
    >
    > --
    > Biff
    > Microsoft Excel MVP
    >
    >
    > "Richard" <Richard@discussions.microsoft.com> wrote in message
    > news:F4DEADC7-2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    > > bill of material;
    > > parent child child child
    > > widget1 nylon carton1 tape
    > > widget2 rubber carton2 film
    > >
    > > list of acceptable values
    > > nylon
    > > rubber
    > >
    > > if the result of looking up a cell with widget1 returns a value which is
    > > in
    > > the list of acceptable values, return value, if not return "error"
    > >
    > > So the first cell with the formula would be targeted to return an
    > > acceptable
    > > value from a list of raw materials such as nylon or rubber say.
    > > Another cell would then have a similar formula but with say an acceptable
    > > value concerning cartons.
    > >
    > > Each set of child parts would only ever contain one raw material in the
    > > acceptable value list, never multiples.
    > >
    > > The database is extracted using Microsoft Query from a stock control
    > > program.
    > > There are about 4500 parent parts and upto a maximum of 8 child parts per
    > > parent.
    > >
    > > Thanks, hope this gives you an idea of what I am stuck on.
    > > (Is there a way I can post a spreadsheet example if this explanation is
    > > not
    > > clear)
    > > Best regards
    > > --
    > > Richard
    > >
    > >
    > > "T. Valko" wrote:
    > >
    > >> Can you post a small example and the expected result?
    > >>
    > >> --
    > >> Biff
    > >> Microsoft Excel MVP
    > >>
    > >>
    > >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    > >> news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    > >> >I have two data tables in Excel 2007.
    > >> > Table A holds a bill of materials with parent and child parts laid out
    > >> > suitable for use with vlookup.
    > >> > Table B holds a selected list of raw materials which are child parts.
    > >> >
    > >> > I want to lookup a parent part from a cell and search for one of its
    > >> > child
    > >> > parts in table A if the result of the search matches one of the raw
    > >> > materials
    > >> > in table B.
    > >> >
    > >> > I can do simple vlookups but this is outside my knowledge.
    > >> > Can anyone please point me in the right direction?
    > >> > Thanks
    > >> >
    > >> > --
    > >> > Richard
    > >>
    > >>
    > >> .
    > >>

    >
    >
    > .
    >


  6. #6
    Richard Guest

    Default Re: looking up a value only if it returns a value in another list

    Okay brilliant, thank you.
    Tried it out and it makes sense.
    Will extend it now to the actual workbook.
    Really grateful
    --
    Richard


    "T. Valko" wrote:

    > If I understand what you want, try this...
    >
    > This data in the range A23 -
    >
    > >widget1 nylon carton1 tape
    > >widget2 rubber carton2 film

    >
    > A10 = parent lookup value = widget1
    >
    > B10:B11 = list of acceptable values
    >
    > Enter this formula in C10 and copy down to C11:
    >
    > =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")
    >
    > --
    > Biff
    > Microsoft Excel MVP
    >
    >
    > "Richard" <Richard@discussions.microsoft.com> wrote in message
    > news:F4DEADC7-2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    > > bill of material;
    > > parent child child child
    > > widget1 nylon carton1 tape
    > > widget2 rubber carton2 film
    > >
    > > list of acceptable values
    > > nylon
    > > rubber
    > >
    > > if the result of looking up a cell with widget1 returns a value which is
    > > in
    > > the list of acceptable values, return value, if not return "error"
    > >
    > > So the first cell with the formula would be targeted to return an
    > > acceptable
    > > value from a list of raw materials such as nylon or rubber say.
    > > Another cell would then have a similar formula but with say an acceptable
    > > value concerning cartons.
    > >
    > > Each set of child parts would only ever contain one raw material in the
    > > acceptable value list, never multiples.
    > >
    > > The database is extracted using Microsoft Query from a stock control
    > > program.
    > > There are about 4500 parent parts and upto a maximum of 8 child parts per
    > > parent.
    > >
    > > Thanks, hope this gives you an idea of what I am stuck on.
    > > (Is there a way I can post a spreadsheet example if this explanation is
    > > not
    > > clear)
    > > Best regards
    > > --
    > > Richard
    > >
    > >
    > > "T. Valko" wrote:
    > >
    > >> Can you post a small example and the expected result?
    > >>
    > >> --
    > >> Biff
    > >> Microsoft Excel MVP
    > >>
    > >>
    > >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    > >> news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    > >> >I have two data tables in Excel 2007.
    > >> > Table A holds a bill of materials with parent and child parts laid out
    > >> > suitable for use with vlookup.
    > >> > Table B holds a selected list of raw materials which are child parts.
    > >> >
    > >> > I want to lookup a parent part from a cell and search for one of its
    > >> > child
    > >> > parts in table A if the result of the search matches one of the raw
    > >> > materials
    > >> > in table B.
    > >> >
    > >> > I can do simple vlookups but this is outside my knowledge.
    > >> > Can anyone please point me in the right direction?
    > >> > Thanks
    > >> >
    > >> > --
    > >> > Richard
    > >>
    > >>
    > >> .
    > >>

    >
    >
    > .
    >


  7. #7
    T. Valko Guest

    Default Re: looking up a value only if it returns a value in another list

    You're welcome. Thanks for the feedback!

    --
    Biff
    Microsoft Excel MVP


    "Richard" <Richard@discussions.microsoft.com> wrote in message
    news:9A050C1F-8DA9-47D2-AD8A-0DD4C211BF45@microsoft.com...
    > Okay brilliant, thank you.
    > Tried it out and it makes sense.
    > Will extend it now to the actual workbook.
    > Really grateful
    > --
    > Richard
    >
    >
    > "T. Valko" wrote:
    >
    >> If I understand what you want, try this...
    >>
    >> This data in the range A23 -
    >>
    >> >widget1 nylon carton1 tape
    >> >widget2 rubber carton2 film

    >>
    >> A10 = parent lookup value = widget1
    >>
    >> B10:B11 = list of acceptable values
    >>
    >> Enter this formula in C10 and copy down to C11:
    >>
    >> =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")
    >>
    >> --
    >> Biff
    >> Microsoft Excel MVP
    >>
    >>
    >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    >> news:F4DEADC7-2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    >> > bill of material;
    >> > parent child child child
    >> > widget1 nylon carton1 tape
    >> > widget2 rubber carton2 film
    >> >
    >> > list of acceptable values
    >> > nylon
    >> > rubber
    >> >
    >> > if the result of looking up a cell with widget1 returns a value which
    >> > is
    >> > in
    >> > the list of acceptable values, return value, if not return "error"
    >> >
    >> > So the first cell with the formula would be targeted to return an
    >> > acceptable
    >> > value from a list of raw materials such as nylon or rubber say.
    >> > Another cell would then have a similar formula but with say an
    >> > acceptable
    >> > value concerning cartons.
    >> >
    >> > Each set of child parts would only ever contain one raw material in the
    >> > acceptable value list, never multiples.
    >> >
    >> > The database is extracted using Microsoft Query from a stock control
    >> > program.
    >> > There are about 4500 parent parts and upto a maximum of 8 child parts
    >> > per
    >> > parent.
    >> >
    >> > Thanks, hope this gives you an idea of what I am stuck on.
    >> > (Is there a way I can post a spreadsheet example if this explanation is
    >> > not
    >> > clear)
    >> > Best regards
    >> > --
    >> > Richard
    >> >
    >> >
    >> > "T. Valko" wrote:
    >> >
    >> >> Can you post a small example and the expected result?
    >> >>
    >> >> --
    >> >> Biff
    >> >> Microsoft Excel MVP
    >> >>
    >> >>
    >> >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    >> >> news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    >> >> >I have two data tables in Excel 2007.
    >> >> > Table A holds a bill of materials with parent and child parts laid
    >> >> > out
    >> >> > suitable for use with vlookup.
    >> >> > Table B holds a selected list of raw materials which are child
    >> >> > parts.
    >> >> >
    >> >> > I want to lookup a parent part from a cell and search for one of its
    >> >> > child
    >> >> > parts in table A if the result of the search matches one of the raw
    >> >> > materials
    >> >> > in table B.
    >> >> >
    >> >> > I can do simple vlookups but this is outside my knowledge.
    >> >> > Can anyone please point me in the right direction?
    >> >> > Thanks
    >> >> >
    >> >> > --
    >> >> > Richard
    >> >>
    >> >>
    >> >> .
    >> >>

    >>
    >>
    >> .
    >>




  8. #8
    Richard Guest

    Default Re: looking up a value only if it returns a value in another list

    Hi there, small glitch.
    I added another data set to parent and child.
    Formula refers to B10 for acceptable value and the acceptable answers are
    either nylon or rubber.
    I moved acceptable values to A6:A7 and changed formula accordingly.
    I F4'd the data ranges as well,

    parent child child child
    widget1 nylon carton1 tape
    widget2 carton2 rubber film
    widget3 rubber carton1 tape


    nylon
    rubber


    widget1 =IF(COUNT(MATCH($A$6:$A$7,INDEX($B$2:$D$4,MATCH($A 10,$A$2:$A$4,0),0),0)),$A$6:$A$7,"error")

    The formula now returns error.
    If I apply an array it returns nylon but ignores the other value of rubber
    when I add other product codes in A11 which should return rubber.

    Would appreciate some more guidance please.

    Thanks
    Richard


    --
    Richard


    "T. Valko" wrote:

    > You're welcome. Thanks for the feedback!
    >
    > --
    > Biff
    > Microsoft Excel MVP
    >
    >
    > "Richard" <Richard@discussions.microsoft.com> wrote in message
    > news:9A050C1F-8DA9-47D2-AD8A-0DD4C211BF45@microsoft.com...
    > > Okay brilliant, thank you.
    > > Tried it out and it makes sense.
    > > Will extend it now to the actual workbook.
    > > Really grateful
    > > --
    > > Richard
    > >
    > >
    > > "T. Valko" wrote:
    > >
    > >> If I understand what you want, try this...
    > >>
    > >> This data in the range A23 -
    > >>
    > >> >widget1 nylon carton1 tape
    > >> >widget2 rubber carton2 film
    > >>
    > >> A10 = parent lookup value = widget1
    > >>
    > >> B10:B11 = list of acceptable values
    > >>
    > >> Enter this formula in C10 and copy down to C11:
    > >>
    > >> =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")
    > >>
    > >> --
    > >> Biff
    > >> Microsoft Excel MVP
    > >>
    > >>
    > >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    > >> news:F4DEADC7-2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    > >> > bill of material;
    > >> > parent child child child
    > >> > widget1 nylon carton1 tape
    > >> > widget2 rubber carton2 film
    > >> >
    > >> > list of acceptable values
    > >> > nylon
    > >> > rubber
    > >> >
    > >> > if the result of looking up a cell with widget1 returns a value which
    > >> > is
    > >> > in
    > >> > the list of acceptable values, return value, if not return "error"
    > >> >
    > >> > So the first cell with the formula would be targeted to return an
    > >> > acceptable
    > >> > value from a list of raw materials such as nylon or rubber say.
    > >> > Another cell would then have a similar formula but with say an
    > >> > acceptable
    > >> > value concerning cartons.
    > >> >
    > >> > Each set of child parts would only ever contain one raw material in the
    > >> > acceptable value list, never multiples.
    > >> >
    > >> > The database is extracted using Microsoft Query from a stock control
    > >> > program.
    > >> > There are about 4500 parent parts and upto a maximum of 8 child parts
    > >> > per
    > >> > parent.
    > >> >
    > >> > Thanks, hope this gives you an idea of what I am stuck on.
    > >> > (Is there a way I can post a spreadsheet example if this explanation is
    > >> > not
    > >> > clear)
    > >> > Best regards
    > >> > --
    > >> > Richard
    > >> >
    > >> >
    > >> > "T. Valko" wrote:
    > >> >
    > >> >> Can you post a small example and the expected result?
    > >> >>
    > >> >> --
    > >> >> Biff
    > >> >> Microsoft Excel MVP
    > >> >>
    > >> >>
    > >> >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    > >> >> news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    > >> >> >I have two data tables in Excel 2007.
    > >> >> > Table A holds a bill of materials with parent and child parts laid
    > >> >> > out
    > >> >> > suitable for use with vlookup.
    > >> >> > Table B holds a selected list of raw materials which are child
    > >> >> > parts.
    > >> >> >
    > >> >> > I want to lookup a parent part from a cell and search for one of its
    > >> >> > child
    > >> >> > parts in table A if the result of the search matches one of the raw
    > >> >> > materials
    > >> >> > in table B.
    > >> >> >
    > >> >> > I can do simple vlookups but this is outside my knowledge.
    > >> >> > Can anyone please point me in the right direction?
    > >> >> > Thanks
    > >> >> >
    > >> >> > --
    > >> >> > Richard
    > >> >>
    > >> >>
    > >> >> .
    > >> >>
    > >>
    > >>
    > >> .
    > >>

    >
    >
    > .
    >


  9. #9
    T. Valko Guest

    Default Re: looking up a value only if it returns a value in another list

    Ok, I don't understand what you're now trying to do?

    --
    Biff
    Microsoft Excel MVP


    "Richard" <Richard@discussions.microsoft.com> wrote in message
    news:4ED359B1-247D-4A6D-BA06-9A9837471D5A@microsoft.com...
    > Hi there, small glitch.
    > I added another data set to parent and child.
    > Formula refers to B10 for acceptable value and the acceptable answers are
    > either nylon or rubber.
    > I moved acceptable values to A6:A7 and changed formula accordingly.
    > I F4'd the data ranges as well,
    >
    > parent child child child
    > widget1 nylon carton1 tape
    > widget2 carton2 rubber film
    > widget3 rubber carton1 tape
    >
    >
    > nylon
    > rubber
    >
    >
    > widget1
    > =IF(COUNT(MATCH($A$6:$A$7,INDEX($B$2:$D$4,MATCH($A 10,$A$2:$A$4,0),0),0)),$A$6:$A$7,"error")
    >
    > The formula now returns error.
    > If I apply an array it returns nylon but ignores the other value of rubber
    > when I add other product codes in A11 which should return rubber.
    >
    > Would appreciate some more guidance please.
    >
    > Thanks
    > Richard
    >
    >
    > --
    > Richard
    >
    >
    > "T. Valko" wrote:
    >
    >> You're welcome. Thanks for the feedback!
    >>
    >> --
    >> Biff
    >> Microsoft Excel MVP
    >>
    >>
    >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    >> news:9A050C1F-8DA9-47D2-AD8A-0DD4C211BF45@microsoft.com...
    >> > Okay brilliant, thank you.
    >> > Tried it out and it makes sense.
    >> > Will extend it now to the actual workbook.
    >> > Really grateful
    >> > --
    >> > Richard
    >> >
    >> >
    >> > "T. Valko" wrote:
    >> >
    >> >> If I understand what you want, try this...
    >> >>
    >> >> This data in the range A23 -
    >> >>
    >> >> >widget1 nylon carton1 tape
    >> >> >widget2 rubber carton2 film
    >> >>
    >> >> A10 = parent lookup value = widget1
    >> >>
    >> >> B10:B11 = list of acceptable values
    >> >>
    >> >> Enter this formula in C10 and copy down to C11:
    >> >>
    >> >> =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")
    >> >>
    >> >> --
    >> >> Biff
    >> >> Microsoft Excel MVP
    >> >>
    >> >>
    >> >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    >> >> news:F4DEADC7-2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    >> >> > bill of material;
    >> >> > parent child child child
    >> >> > widget1 nylon carton1 tape
    >> >> > widget2 rubber carton2 film
    >> >> >
    >> >> > list of acceptable values
    >> >> > nylon
    >> >> > rubber
    >> >> >
    >> >> > if the result of looking up a cell with widget1 returns a value
    >> >> > which
    >> >> > is
    >> >> > in
    >> >> > the list of acceptable values, return value, if not return "error"
    >> >> >
    >> >> > So the first cell with the formula would be targeted to return an
    >> >> > acceptable
    >> >> > value from a list of raw materials such as nylon or rubber say.
    >> >> > Another cell would then have a similar formula but with say an
    >> >> > acceptable
    >> >> > value concerning cartons.
    >> >> >
    >> >> > Each set of child parts would only ever contain one raw material in
    >> >> > the
    >> >> > acceptable value list, never multiples.
    >> >> >
    >> >> > The database is extracted using Microsoft Query from a stock control
    >> >> > program.
    >> >> > There are about 4500 parent parts and upto a maximum of 8 child
    >> >> > parts
    >> >> > per
    >> >> > parent.
    >> >> >
    >> >> > Thanks, hope this gives you an idea of what I am stuck on.
    >> >> > (Is there a way I can post a spreadsheet example if this explanation
    >> >> > is
    >> >> > not
    >> >> > clear)
    >> >> > Best regards
    >> >> > --
    >> >> > Richard
    >> >> >
    >> >> >
    >> >> > "T. Valko" wrote:
    >> >> >
    >> >> >> Can you post a small example and the expected result?
    >> >> >>
    >> >> >> --
    >> >> >> Biff
    >> >> >> Microsoft Excel MVP
    >> >> >>
    >> >> >>
    >> >> >> "Richard" <Richard@discussions.microsoft.com> wrote in message
    >> >> >> news:9E625053-85E2-4D1B-9F52-FC6269784B36@microsoft.com...
    >> >> >> >I have two data tables in Excel 2007.
    >> >> >> > Table A holds a bill of materials with parent and child parts
    >> >> >> > laid
    >> >> >> > out
    >> >> >> > suitable for use with vlookup.
    >> >> >> > Table B holds a selected list of raw materials which are child
    >> >> >> > parts.
    >> >> >> >
    >> >> >> > I want to lookup a parent part from a cell and search for one of
    >> >> >> > its
    >> >> >> > child
    >> >> >> > parts in table A if the result of the search matches one of the
    >> >> >> > raw
    >> >> >> > materials
    >> >> >> > in table B.
    >> >> >> >
    >> >> >> > I can do simple vlookups but this is outside my knowledge.
    >> >> >> > Can anyone please point me in the right direction?
    >> >> >> > Thanks
    >> >> >> >
    >> >> >> > --
    >> >> >> > Richard
    >> >> >>
    >> >> >>
    >> >> >> .
    >> >> >>
    >> >>
    >> >>
    >> >> .
    >> >>

    >>
    >>
    >> .
    >>




  10. #10
    Richard Guest

    Default Re: looking up a value only if it returns a value in another list

    Hi there, may we go back to your answer below.
    The result of the formula must be either nylon or rubber, B10:B11.
    Whichever one it finds in the range B23 for widget1 or widget2.

    Your formula only refers to B10 so it only looks for nylon.
    When it is copied down it refers to B11 so it only looks for rubber.

    Can it look for nylon or rubber (B10:B11) and return whichever one it finds
    in the child parts.

    Hope this makes sense, I kinda need to post a spreadsheet to make it clearer.

    Many thanks

    Richard


    > >> >> If I understand what you want, try this...


    > >> >> This data in the range A23 -
    > >> >> >widget1 nylon carton1 tape
    > >> >> >widget2 rubber carton2 film
    > >> >>
    > >> >> A10 = parent lookup value = widget1
    > >> >>
    > >> >> B10:B11 = list of acceptable values
    > >> >>
    > >> >> Enter this formula in C10 and copy down to C11:
    > >> >>
    > >> >> =IF(COUNT(MATCH(B10,INDEX(B$2$3,MATCH(A$10,A$2:A$3,0),0),0)),B10,"error")

    2B8E-4CAB-9F9B-9F1601D34505@microsoft.com...
    > >> >> > bill of material;
    > >> >> > parent child child child
    > >> >> > widget1 nylon carton1 tape
    > >> >> > widget2 rubber carton2 film
    > >> >> >
    > >> >> > list of acceptable values
    > >> >> > nylon
    > >> >> > rubber
    > >> >> >
    > >> >> > if the result of looking up a cell with widget1 returns a value
    > >> >> > which
    > >> >> > is
    > >> >> > in
    > >> >> > the list of acceptable values, return value, if not return "error"
    > >> >> >
    > >> >> > So the first cell with the formula would be targeted to return an
    > >> >> > acceptable
    > >> >> > value from a list of raw materials such as nylon or rubber say.
    > >> >> > Another cell would then have a similar formula but with say an
    > >> >> > acceptable
    > >> >> > value concerning cartons.
    > >> >> >
    > >> >> > Each set of child parts would only ever contain one raw material in
    > >> >> > the
    > >> >> > acceptable value list, never multiples.
    > >> >> >
    > >> >> > The database is extracted using Microsoft Query from a stock control
    > >> >> > program.
    > >> >> > There are about 4500 parent parts and upto a maximum of 8 child
    > >> >> > parts
    > >> >> > per
    > >> >> > parent.



Similar Threads

  1. Import 1, 3, 6, and 12 month returns for a list of mutual funds
    By ryguy7272 in forum Programming (VBA, VB, C# etc)
    Replies: 8
    Last Post: 02-08-2010, 10:01 PM
  2. Replies: 3
    Last Post: 11-20-2009, 02:41 AM
  3. Replies: 1
    Last Post: 03-30-2009, 10:06 AM
  4. Unique item list still returns duplicates
    By AC in forum Programming (VBA, VB, C# etc)
    Replies: 2
    Last Post: 03-02-2009, 07:15 AM
  5. Function returns a list
    By Rana in forum Worksheet Functions
    Replies: 2
    Last Post: 02-15-2009, 07:37 PM

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