+ Reply to Thread
Results 1 to 12 of 12

How To Access Information From A Table

  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    21

    How To Access Information From A Table

    I am familiar with Excel, but have a hard time figuring out the best approach to a problem. I have a form where I have a drop down list to select a specific pipe material for the specific work (see Water Piping.JPG). Once I select this material, I would like it to pull the specific prices for each pipe size from another worksheet (see Pipe Pricing.jpg) for that specific material and specific size. Basically I am looking at a way to quickly change the material and see the differences in price between various options. I have approximately 20 different material types and pricing for each of these. The only thing I have done in the past was an If/Then statement to do this for a couple of pipes, but it got to be vary cumbersome.

    I have attached a couple of images from this issue showing the information I have.

    Any thoughts on a more efficient way to accomplish this task?
    Attached Images Attached Images

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

    Re: How To Access Information From A Table

    don't post images ,post a workbook
    "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

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

    Re: How To Access Information From A Table

    Something like:

    =IF($C6="",0,INDEX(INDEX('Pipe Pricing'!$B:$B,MATCH($C$2,'Pipe Pricing'!$A:$A,0)):'Pipe Pricing'!$A1000,MATCH($C6,INDEX('Pipe Pricing'!$A:$A,MATCH($C$2,'Pipe Pricing'!$A:$A,0)):'Pipe Pricing'!$A1000,0)))

    copied down

    Where your material choice is in C3 of the Water Piping sheet, and the descriptions start at C6 of the same sheet. And assuming the lookup table sheet is call Pipe Pricing and the data is in columns A:B. I used A1000 as bottom row.. you can adjust....
    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.

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

    Re: How To Access Information From A Table

    ok i wont bother ,post as many images as you like someone will answer you

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

    Re: How To Access Information From A Table

    I just did guessing.. I am off now so I took a stab.. and with the forum attachments being an issue these days... I said, wtf.

  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: How To Access Information From A Table

    fair comment lol

  7. #7
    Registered User
    Join Date
    12-09-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: How To Access Information From A Table

    I will post something in a little bit. Sorry about that.

  8. #8
    Registered User
    Join Date
    12-09-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: How To Access Information From A Table

    I just cut and past for these items.
    Attached Files Attached Files

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

    Re: How To Access Information From A Table

    My guess wasn't too far off.

    I used this formula in E7:

    Please Login or Register  to view this content.
    It uses IFERROR to return a blank if the Description is blank or a match isn't found. Note, though, that you are not consistent with the descriptions on the 2 sheets... one has dashes and the other doesn't.... You should be consistent.

    I also added a multiplier to multiple the looked up price by the quantity to give an extended cost... not sure if that was what you wanted, but you can remove the *A7 part if desired
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-11-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: How To Access Information From A Table

    Hi,

    There is a simple way you can get this fixed. Use data validation for your product and then do a vlookup.

    Please see the sheet 3 in attachement.

    Hope that helps....have a great day!!

    Warm regards
    Ishtiyaq
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-09-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: How To Access Information From A Table

    I took a look at NBVC reply on 12/10 8:58AM post and tried that out. There is still one issue that I was having. There are times that when I select a certain pipe material that the pipe sizes available only go up to a certain pipe size. For example, if you look the example I posted and see when I select K Soft it gets the right price for pipe sizes up to 2", but them grabs pricing from the M Hard pipe material just below. Is there a way to have it only pull sizes that fall within the specific material and if that size doesn't exist within this material that it puts an N/A by it?
    Attached Files Attached Files

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

    Re: How To Access Information From A Table

    Ok, maybe we need to look at this another way....

    Why don't we create named tables for each of the materials.

    So, in Pipe Pricing you would select A4:B12 and in the NameBox, to the left of the Formula Bar, you would type: LHard (note: no spaces).

    Repeat for the other materials.

    Then the formula in E8 is an easier:

    =IFERROR(VLOOKUP(C8,INDIRECT(SUBSTITUTE($C$5," ","")),2,0),"")

    copied down

    Update your formula in G8 to accomodate with:

    =IF(E8="","",A8*E8)

    copied down.

    is that better?
    Attached Files Attached Files

+ 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