Consulting

Results 1 to 5 of 5

Thread: v lookup problem

  1. #1

    v lookup problem

    i've got a v lookup that finds a code in a matrix, copys the price to another sheet, where a variance is calculated.

    in some cases m,ore than 1 code makes up a part, so i might have "A123" as a simple code, but i have also got "A123 + 2 of A213"

    is there a way of breaking the second code example down and making it calculate the cost of the 2 components, and add that to the price of the first?

    theres lots to do i don't particularly want to do it by hand

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Quote Originally Posted by rodney_malod
    i've got a v lookup that finds a code in a matrix, copys the price to another sheet, where a variance is calculated.

    in some cases m,ore than 1 code makes up a part, so i might have "A123" as a simple code, but i have also got "A123 + 2 of A213"

    is there a way of breaking the second code example down and making it calculate the cost of the 2 components, and add that to the price of the first?
    YOu are going to have explain some of this to get an answer...

    What identifies "some cases more the 1 code makes up a part"? Are there more that 1 part number in a cell? Where is the quantity? is the data in table or list for getting the prices?

    Does the result have to be in one cell?

    Gonna need some more to go on...
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  3. #3
    sorry, in one cell is basically a product code, but sometimes that product is made up of more than one part number, hence the "A123 + 2 of A321" that is the code for a kit.
    i need to somehow get the code to break down into its individual parts so "A123" and "A321" "A321" so that the vlookup find the price for the individual components, so if:
    "A123" = ?4
    and
    "A321" = ?1

    then i wish the price of ?6 to be returned in a single cell.

  4. #4
    VBAX Expert
    Joined
    Jul 2004
    Location
    Wilmington, DE
    Posts
    600
    Location
    Rodney,

    Could you please upload a small sample file demonstrating this? I'm still not getting it

    Patrick

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Rodney,
    It looks to me that your cell text is going to be critical if it is to be analysed by code to return the parts. It's likely that you'll need a userform or similar to ensure that text entry is exact.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •