+ Reply to Thread
Results 1 to 7 of 7

Return a value based on a condition

  1. #1
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    Return a value based on a condition

    Hi everyone. I am in dire need of help. Please see attached.

    In the Min Prices sheet, ingredients are listed. I would like the minimum prices of these ingredients and the corresponding source to show in their appropriate columns, based on the data in the Ingredients List sheet.

    Does anyone know if this can be done with Pivot Tables, or some other method?

    Any assistance would be much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return a value based on a condition

    with an pivot table.

    see the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Return a value based on a condition

    The attached file is similiar to oeldere, but with a formula in column G to display the source. You can then hide columns C:E, and get the list structured how you wanted it.
    Attached Files Attached Files
    Please click the * icon below if I have helped.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return a value based on a condition

    @Melvinrobb

    Great solution

    I'm interested how you get your index / match formula in column G.

    If I try that i get GETPIVOTDATA in my formula.

  5. #5
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Return a value based on a condition

    Not entirely sure I get what you mean, but I think I do.
    Instead of manually clicking on the cell, actually type in F5 (or whatever cell/range you want to reference).
    You should never have to change the ranges, as each formula simply references the individual row, but you will have to drag the formula down dependant on the number of rows of the pivot table.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return a value based on a condition

    Instead of manually clicking on the cell, actually type in F5 (or whatever cell/range you want to reference).

    This one did the trick.

    How easy can an solution be (if you know the answer).

    Thanks very much for lighting this up for me.

    Point of rep. goes your way.

  7. #7
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    Re: Return a value based on a condition

    Awesome. Thank you Melinrobb and oeldere!

+ 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