+ Reply to Thread
Results 1 to 9 of 9

Multi Range Arguments

  1. #1
    Registered User
    Join Date
    10-15-2009
    Location
    Huntington Beach
    MS-Off Ver
    Excel 2007
    Posts
    22

    Multi Range Arguments

    To find that answer I have to sort thru 2 range questions and I cannot figure out how to order them.

    Item Sold Unit Price Percent
    RSA0314 64 $32.00 3.08%
    A0314SS 0 $34.00 0.00%
    RSA0315 0 $40.00 0.00%
    RSA0317 0 $34.00 0.00%
    RSA0318 0 $28.00 0.00%
    RSA0319 65 $65.00 3.08%

    What I need to be able to do is find the greatest percent within a give price range. Say I am looking for the largest percentage within the price range of $30-$40.

    I have been using "large" to find my percentages, but cannot figure out argument to put before "large" to equate that to the price range that I am looking for.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Multi Range Arguments

    Hello grg

    you need to order your table by unit price, small to large (ascending). Then you can use an Index/Match combo to define the range.

    Have a look at the attached and inspect the formula in H2 with the Evaluate Formula tool on the Formulas ribbon.

    cheers
    Attached Files Attached Files

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multi Range Arguments

    Or, if you're unable to sort the table:

    =MAX(IF(($C$2:$C$7>=30)*($C$2:$C$7<=40),$D$2:$D$7))
    confirmed with CTRL + SHIFT + ENTER

    (references to 30 and 40 can be replaced with cell references that contain the values of interest)

  4. #4
    Registered User
    Join Date
    10-15-2009
    Location
    Huntington Beach
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Multi Range Arguments

    Is there any way to return the item rather than the percentage?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multi Range Arguments

    Yes, use INDEX and MATCH the MAX against the % Column, ie:

    =INDEX($A$2:$A$7,MATCH(MAX(IF(($C$2:$C$7>=30)*($C$2:$C$7<=40),$D$2:$D$7)),$D$2:$D$7,0))
    confirmed with CTRL + SHIFT + ENTER

    (if you're storing the MAX % in another cell already then don't repeat the calculation - use the cell containing the MAX% as the criteria in the MATCH - at which point the need for Array entry is removed)

  6. #6
    Registered User
    Join Date
    10-15-2009
    Location
    Huntington Beach
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Multi Range Arguments

    That returns something that isn't on my sheet, AALC7.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multi Range Arguments

    In which case I suspect something has been transferred incorrectly.

    Post a sample.

  8. #8
    Registered User
    Join Date
    10-15-2009
    Location
    Huntington Beach
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Multi Range Arguments

    I am including the whole data set because I can't quite get the formulas to work.

    I need to return the style name with the largest sales percent within a given price range.

    Once I have an example to go off of I can change the data to get the rest of the info that I need, I just can't get any of the formulas to return the right values at this moment.

    Thanks for the help.
    Attached Files Attached Files

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multi Range Arguments

    You have issues in so far as G1981 contains an underlying error (#DIV/0!) - this can be accounted for but I will assume for sake of demo this is a typo / oversight.

    If we assume you want to return Desc1 associated with Max % where price between $6 and $7 such that J1 holds 6 and K1 7 then:

    Please Login or Register  to view this content.
    confirmed with CTRL + SHIFT + ENTER

+ 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