+ Reply to Thread
Results 1 to 24 of 24

Index & match help

  1. #1
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Index & match help

    Hello,

    I am looking what I believe to be a formula with index and match, but cant figure it out. What I am looking to do is create a spreadsheet for my window business that can look up prices for me instantly

    I have 4 columns: EXAMPLE

    window type ; height ; width ; price

    SH ; 24 ; 36 ; $100
    SH ; 24 ; 50 ; $200
    SH ; 30 ; 36 ; $150
    SH ; 30 ; 50 ; $250

    i need a formula that compare the window type, the height and width and then spit out the price. the problem is i need the height and width to be variable, meaning if a window is 26 x 36 it will give me the 30 x 50 price ; if its 24 x 38 it will give me the 24 x 50 price...obviously i will have more window types than SH so I need that to be exact match and the height and width to be ranges and spit out the price i need. Can someone help me with this formula?

    Thanks in advance!
    Attached Files Attached Files
    Last edited by BMBme; 10-21-2015 at 10:42 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,625

    Re: Index & match help

    (How to) Upload a Workbook directly to the Forum
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Index & match help

    Hi, welcome to the forum

    Agree that a sample workbook will help.

    Have you considered creating a few tables? 1 for each "type" (SH, DH, etc), and have the width across the top and the length down the side? We could probably use an INDEX./MATCH fubction for this
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    Sorry, but thanks for the help, I added the workbook. I want the user to input the type, height and width on top, and have the worksheet find the price. But I need the height and width to be a range as I described above. If it's a 24x48, i need it to give me the 24x50 price...if its 34x48 I would need the 36x50 price so it needs to round up. Hope that info helps you help me! Thanks for trying!!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Index & match help

    I converted your table to this...
    F
    G
    H
    10
    WIDTH
    11
    HEIGHT
    36
    50
    12
    24
    110
    140
    13
    30
    210
    240
    14
    36
    310
    340
    Then used this to pull the value from that table...
    =INDEX($G$12:$H$14,MATCH(B3,F12:F14)+IF(INDEX($F$12:$F$14,MATCH(B3,F12:F14))=B3,0,1),MATCH(C3,G11:H11)+IF(INDEX($G$11:$H$11,MATCH(C3,G11:H11))=C3,0,1))

    Now, I notice that the difference between SH and SS is 10...except for 30x60 - that diff is 20. was this a mistake? If so, then you could ajust my formula to this...
    =INDEX($G$12:$H$14,MATCH(B3,F12:F14)+IF(INDEX($F$12:$F$14,MATCH(B3,F12:F14))=B3,0,1),MATCH(C3,G11:H11)+IF(INDEX($G$11:$H$11,MATCH(C3,G11:H11))=C3,0,1))+IF(A3="SS",10,0)

    If you have more than those 2 tyupes, mayber we can work out a "difference" table for the extra?

  6. #6
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    FDibbins,

    The problem with the table like that is I need the type in the parameters as well, because I just posted a small sample of what the finished spreadsheet will be like. I will have about 20 different types and hundreds of different sizing and pricing options. If TYPE A for example is chosen, then I need it to go to the height parameters, followed by the width and then shoot out the price. Type will be an exact match, while the height and width may be, but most likely not be exact so I need it to round to the next highest value if its in the middle. I appreciate you trying to help me so much!

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,625

    Re: Index & match help

    Please post a more representative sample

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Index & match help

    You have lots of different sizes, OK, but surely they all still fall within certain sizes - so you could still build that table and expand on it. Also, I asked if there was any factor or amount that was a standard add-on for the various types? Perhaps have the SH (or whichever) as the base style, and all else is an increase on that - either amount of %...this could also be a small table that gets looked up.

    Agree with Ben though, more detail will let us provide better suggestions

  9. #9
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    Ok, I've amended the spreadsheet....maybe this will help:

    My types, sizes and prices (i've made more to better understand), then at the top i labeled the user input columns a,b,c and want the spreadsheet spit out the price from the user inputs.

    So, first the user would select a choice in A:type (which I now have 3 choices), then they would manually enter the height(B), and then the width(C). Now the formula I need for D is to determine the price I am looking for. So if for example someone enters in TYPE a SS, the height is 36 and the width is 36, in column D it should say 210. However what if the user enters SS, the height 36, the width 28? I would want the spreadsheet to make it go to the 36x36 and spit out the price of 210 (so i want the size price to always round up....example ; SH 24x24 = 100, SH 24x38 = 150, SH 26x36 = 175 ; SH 38 x 55 = 300. Does that clear up what I need it to do?

    Once again, thanks for the help...it is MUCH appreciated!
    Attached Files Attached Files

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Index & match help

    What if round up of height is available but round up of width is not?
    i.e SH 25x55
    Quang PT

  11. #11
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    Great question, would it be possible to make it say N/A?

  12. #12
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Index & match help

    Also, for each TYPE, height is in increasing order always?

  13. #13
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    Yes I always want to round up to the next highest to be accurate

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Index & match help

    I still think a series of tables like this will work for you. You could give each table a range name, and use that in the index/match
    F
    G
    H
    I
    J
    11
    24
    36
    50
    60
    12
    24
    100
    125
    150
    NA
    13
    30
    125
    175
    225
    NA
    14
    36
    150
    200
    250
    NA
    15
    50
    300
    NA
    NA
    300

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Index & match help

    Give it a first shot, hope it is only shot.

    =INDEX($D$12:$D$41,MATCH(1,($A$12:$A$41=$A$3)*($B$12:$B$41-$B$3=MIN(IF($B$12:$B$41-B3>=0,$B$12:$B$41-B3,"")))*($B$12:$B$41-B3>=0)*($C$12:$C$41-$C$3>=0),0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  16. #16
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    FDibbins, but a table is only two-way, i still need the type in there as well...

  17. #17
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    Wow bebo021999! That almost works perfect and I think were on the right track, but some variables like 40x45 are returning #N/A. Cant seem to figure out why? But you are amazing you pretty much nailed what I wanted to do, I just need to tweek some of the variables I think. Thanks for helping me out with this!

  18. #18
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    Also, if I go to say SH or SS 40x45 I'd want it to go the 50x60 price, but it is saying #N/A

  19. #19
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Index & match help

    Quote Originally Posted by BMBme View Post
    FDibbins, but a table is only two-way, i still need the type in there as well...
    Thats where a table for each type comes in, with each 1 given a range name

  20. #20
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Index & match help

    Ohh, my mistake, try again:

    =INDEX($D$12:$D$41,MATCH(1,($B$12:$B$41-$B$3=MIN(IF(($A$12:$A$41=$A$3)*($B$12:$B$41-$B$3>=0),$B$12:$B$41-$B$3,"")))*($B$12:$B$41-$B$3>=0)*($C$12:$C$41-$C$3>=0),0))
    Last edited by bebo021999; 10-21-2015 at 01:12 AM.

  21. #21
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    bebo02199, we are getting closer, but the SS seems to be pulling up the SH pricing and the PW category is doing the same thing on some pulling up the SH pricing, but some works....weird. Appreciate all the help, been trying to figure out why its off but I can't.

  22. #22
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Index & match help

    Try again:

    =INDEX($D$12:$D$41,MATCH(1,($A$12:$A$41=$A$3)*($B$12:$B$41-$B$3=MIN(IF(($A$12:$A$41=$A$3)*($B$12:$B$41-$B$3>=0),$B$12:$B$41-$B$3,"")))*($B$12:$B$41-$B$3>=0)*($C$12:$C$41-$C$3>=0),0))

    Hope it works!

  23. #23
    Registered User
    Join Date
    10-20-2015
    Location
    Michigan, USA
    MS-Off Ver
    Office 2016
    Posts
    18

    Re: Index & match help

    bebo021999!! You did it!! Thank you so much for taking the time to help me out! It seems to work perfect and do exactly what I need it to do! Thanks again!

  24. #24
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Index & match help

    Nice to hear it works.

+ 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. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  2. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  3. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  4. [SOLVED] Index Match from a cell populated from index match
    By MarcLewis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-15-2013, 05:30 AM
  5. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  6. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  7. Replies: 5
    Last Post: 02-29-2012, 08:51 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1