+ Reply to Thread
Results 1 to 12 of 12

I need help with Array formula??

  1. #1
    Registered User
    Join Date
    10-10-2011
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    I need help with Array formula??

    Hi,

    I'm having problems figuring out how to create what I need. Any help would be appreciated.
    I'm trying to create a grid that says (for example), if the Width is 10" - 14" and the Height 20" - 36", then the price is $100.00
    This continues (if the width is 14" - 18" and the height is 36" - 42", then the price is $130 etc...
    The formulas need to recognize either fractions or decimals so if I were to enter 10 1/2" or 10.5 as my width, then the price would still be $100.
    Does this make sense?
    Is this even possible?
    Thank you in advance for any help.
    Jacen

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

    Re: I need help with Array formula??

    What price should be if 10.5 width and 40 height ? Does this kind of dimension exist?
    Quang PT

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I need help with Array formula??

    10.5 would work, 10 1/2 not so much.

    Create a table with height going down the left as row labels, and widths going across the top of the table as headers. Do not enter the "range" as 10-14, just enter that value of the START of each range. When the next range starts, that indicates the prior range has ended. It will look like this:

    Please Login or Register  to view this content.

    Now you can use an INDEX(Match, Match) formula to get the price from the grid.

    Height in A25, Width in B25, this formula in C25:

    =INDEX($B$2:$F$6, MATCH(B25, $A$2:$A$6, 1), MATCH(C25, $B$1:$F$1, 1))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,472

    Re: I need help with Array formula??

    I think it would be possible.

    A thread title of "two dimensional table lookup" might solicit more relevant repsonses though.

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook question. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results..
    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
    To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'.
    Clicking this button will open a new window for uploading attachments.

    You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
    Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file.

    To upload a file from another URL, enter the full URL for the file in the second box on this page.
    Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    10-10-2011
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: I need help with Array formula??

    Thanks for your input.
    I'm new to this forum and new to Excel - I apologize for my ignorance.
    Although you've outlined how to upload a workbook so I can better articulate what I need, I can't figure out how to do so.
    I've created a sample workbook with the grid I've described - how do I upload it so that those who've replied to my query will be able to see what I'm referring to?
    Thanks again.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I need help with Array formula??

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.

  7. #7
    Registered User
    Join Date
    10-10-2011
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: I need help with Array formula??

    Hopefully that'll help.
    Thanks!
    Attached Files Attached Files

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I need help with Array formula??

    Step by step instructions in post #3 were exactly right. You just needed to follow them, just put the START of each tier around the table to indicate the ranges. Then the formula as given worked fine. I've cleaned up the first two tables at the top for proper table layout and show an example below them using the data. You can repeat that with the other sections.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-10-2011
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: I need help with Array formula??

    Thank you JBeaucaire. I'm just seeing this and I think it may work. Does this account for the fractional (or even decimal) increments between the whole numbers?
    i.e. 10 5/8" or 73 1/2"?
    Thanks again.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I need help with Array formula??

    Quote Originally Posted by Jacen View Post
    Does this account for the fractional (or even decimal) increments between the whole numbers?
    i.e. 10 5/8" or 73 1/2"?

    Does it work when you try it?

  11. #11
    Registered User
    Join Date
    10-10-2011
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: I need help with Array formula??

    Hi JBeaucaire,

    It does seem to work - thank you very much. I sincerely appreciate your help.
    My web designer is trying to get a better handle on the formula and what I'm trying to do with it.
    She asked if she could email you with a few questions.
    Would that be OK with you?
    Thanks again.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I need help with Array formula??

    The INDEX and MATCH functions are well-documented in Excel itself. (Press F1 to look them up in the Help Files).

    Have her read through Excel's help files on those functions and then post any extended questions here.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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