+ Reply to Thread
Results 1 to 9 of 9

Return the lowest value in one column based on a text search in a different column.

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    9

    Return the lowest value in one column based on a text search in a different column.

    Hi everyone,

    I have a table with 4 columns. In the first one "A" I have a date, then the name of the product in "B", then the name of the company from which it is purchased "C" and than the price "D". The products are 341 (unique ones) in total but they repeat since each one has been purchased many times (there are 2000+ rows).

    I have generated an alphabetical list with th 341 unique products. Next to each one I am trying to write a formula, which checks coloumn B, identifies the rows containing the first product in my alphabetical list and then returns the lowest value from column D. Next to it, in the next column I want to have the name of the company (from column C) which gives this lowest value.

    Thank you very much in advance!

    Regards,
    Juliana

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Return the lowest value in one column based on a text search in a different column.

    Hello to you. Welcome to the forum.

    You need an Array =MIN(IF(......)) for this.

    Pls upload a sample workbook for this.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Return the lowest value in one column based on a text search in a different column.

    Use Pivot table

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Return the lowest value in one column based on a text search in a different column.

    I'm not sure about your lay-out, but the CSE formula =MIN(IF(B1:B1000="apple", D1:D1000)) will be the lowest price paid for an apple.

    =INDEX(C1:C1000, MATCH(MIN(IF(B1:B1000="apple", D1:D1000)), IF(B1:B1000="apple", D1:D1000), 0), 1) will be the company that sold that cheap apple.

    These formulas should be entered with Ctrl-Shift-Enter (Cmd+Return for Mac)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Return the lowest value in one column based on a text search in a different column.

    its easier to sort this if you add a work book but somthing like this

    min array.xlsx

    entered with CTRL+SHIFT+ENTER)
    Please Login or Register  to view this content.
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  6. #6
    Registered User
    Join Date
    10-11-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Return the lowest value in one column based on a text search in a different column.

    Thanks for the welcoming words and for the answers. Here is a short version of my table. I did Use a pivot table. Unfortunately, I can only calculate the min value and I don't know how to return the name of the company which corresponds to it. This is why I am looking for a formula. Return the lowest price and the name of the company.xlsx

  7. #7
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Return the lowest value in one column based on a text search in a different column.

    see my attched book it may help

    min array (1).xlsx

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Return the lowest value in one column based on a text search in a different column.

    Pull under product another row for companies

  9. #9
    Registered User
    Join Date
    10-11-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Return the lowest value in one column based on a text search in a different column.

    Thank you very much! The array formula did work out!

+ 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