+ Reply to Thread
Results 1 to 12 of 12

Need a formula that can check multiple criteria and return a value.

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Need a formula that can check multiple criteria and return a value.

    HI
    I am creating a chart that has 4 columns ID, Model, Type, & Price. I am wondering how to get excel to:

    1--look down the "ID" column and match the id's
    2--look at the "Type" column to decide whether it is a "single" or "group"
    3--look to "Model" column to see what models are used with the same id's
    4--check a seperate tab "Combo" with a list of models and price
    5--return the listed price for the particular "model set" from the "Combo" tab to the "Price" column

    I attached a workbook with what I have so far it's not working ofcourse, any help would be appreciated.

    Thanks
    group-single.xlsx
    Last edited by DeeJay256; 11-28-2012 at 09:30 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need a formula that can check multiple criteria and return a value.

    DeeJay,

    Welcome to the forum. While a formula as described in your heading can be provided, it isn't clear (at least to me!) what the results should be / how they should look. Could you amend your speadsheet to clearly show your expected results? You can just type the results in.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  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,936

    Re: Need a formula that can check multiple criteria and return a value.

    i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few exapmples of what your expected outcome is, and how you arrived at that.

    Looking at you're file, i cannot figure out what you want or how you would get that
    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
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need a formula that can check multiple criteria and return a value.

    Thanks for the quick responses. What I am looking for is a code to say here is id number 16589, it is a group, it consist of models Davolio, Fuller , and Peacock, the price for those models in that combination is $300. Hope this clears up the confusion thanks again.




    group-single.xlsx

  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,936

    Re: Need a formula that can check multiple criteria and return a value.

    sorry, you have shown what you're expected outcome is, but not how you arrived at that?

    for instance, you have...
    16580...Davolio....Single....$500
    but you do not explain how you arrive at the 500
    likewise for...
    16589....Davolio....Group....$300
    if you are pulling the data from Combo sheet, how do you determine what is "single" and what is "group"

  6. #6
    Registered User
    Join Date
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need a formula that can check multiple criteria and return a value.

    I posted a second workbook with that information in it like you asked for the first time, so I am not sure what you are asking for.

    Thanks for the help.

  7. #7
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need a formula that can check multiple criteria and return a value.

    Quote Originally Posted by DeeJay256 View Post
    I posted a second workbook with that information in it like you asked for the first time, so I am not sure what you are asking for.
    It isn't clear how you're arriving at the results in the Chart tab.

    Eg: "1--look down the "ID" column match the id number" - match the number to what? You need something to match the ID numbers to, but there are no ID numbers anywhere else in your spreadsheet.

    Eg: "2--look at the "Type" column to decide whether it is a "single" or "group"" - again, how do you arrive at this? There is no other column containing "single" or "group" information nor is there any clue in your spreadsheet as to how you arrive at "single" or "group".

    Etc, etc.

    You'll find people here are happy to assist you, but you need to explain clearly what you want, and the logic behind how you arrive at your results, otherwise we're just fumbling around in the dark.

  8. #8
    Registered User
    Join Date
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need a formula that can check multiple criteria and return a value.

    Ok I think I follow you, how is this ?

    On the Chart Tab

    1--look down the "ID" column and match the id's:
    What I mean is match the ID's to each other on the CHART tab and in the ID column.If you have 16580, 16589, 16590 etc in the ID column on the CHART tab then the code finds all of the 16589 id's in the ID column on the CHART tab to begin making the model set.

    2--look at the "Type" column to decide whether it is a "single" or "group":
    This information is default information this is how the model sets are defined. The information will always say "group" or "single" and the ID sets will always be one or the other.There will never be one ID number with both "TYPES" listed. I need the code to look at the TYPE column and reconize if it is "single" or "group" to continue in making the Model set.

    3--look to "Model" column to see what models are used with the same id's:
    Once to this step the code should have created the model set by using the id numbers in the ID column on the CHART tab and determined whether or not the model set is a "group" or "single" from the TYPE column on the CHART tab. This way the code knows what model set it is looking at. Example: Davolio, Fuller, Peacock this set all have the same ID number from the ID column on the CHART tab and are all listed as a "group" in the TYPE column on the CHART tab.

    On the Combo Tab

    4--check a seperate tab "Combo" with a list of models and price:
    This step is checking the model set that has been created in the first three steps and checking it against the listed model sets on the "Combo" tab to get the price for the created set from the PRICE column on the COMBO tab.

    On the Combo and Chart Tab

    5--return the listed price for the particular "model set" from the "Combo" tab to the "Price" column

    This is the final step where all the previous steps come together. If done correctly the id numbers from the ID column on the CHART tab should have been matched up so that there is a complete model set to look at, the type of model set being created should have been defined as "group" or "single" from the TYPE column on the CHART tab, and the price for that model set should be known from the PRICE column on the COMBO tab, leaving the last part of returning that price from the PRICE column on the COMBO tab to the PRICE column on the CHART tab.

    Hope this helps

    Thanks for the help.

  9. #9
    Registered User
    Join Date
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need a formula that can check multiple criteria and return a value.

    Just wanted to bring this back up and see if any more information was needed or if it is possible to do.

    Thanks for the help.

  10. #10
    Registered User
    Join Date
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need a formula that can check multiple criteria and return a value.

    Is there a way to combine the following 3 formulas to get the results I am looking for?

    =IF($A$2:$A$10,$A$2:$A$10)

    =IF(C2=" Group", TRUE,FALSE)

    =VLOOKUP(B2,Combo!$A2:$E19,5,FALSE)

    Thanks for the help.

  11. #11
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need a formula that can check multiple criteria and return a value.

    DeeJay,

    I have finally figured out what it is you want to do, but you certainly didn't make that - figuring it out - easy. I respectfully suggest that, in future, for your sake as well as anyone else who's trying to assist you - don't make things any more complicated than they need to be. Your "Type" column, as far as I can see, is completely irrelevant to the answer you're seeking - I certainly didn't use it, and I have the same answers as you; and talk of "model sets being created" is just confusing and ultimately, given that your query has had in excess of 200 views and only 2 people have tried to help you, doesn't help you get your query answered.

    All you needed to do was to assign the ID numbers you have in your Chart tab to the relevant ROWS in your Combo tab, so you have something on each tab to match. Then it's just a matter of using an INDEX/MATCH formula to take the ID in the Chart tab, look for it in the Combo tab, then return the corresponding price.

    I've included an IF which checks if the ID number being checked is the same as the one above it, and if it is, it returns "-" so you don't have duplicate prices.

    Good luck.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    11-15-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need a formula that can check multiple criteria and return a value.

    Brendan,

    First thanks for taking the time to even give this problem a try. Your code is a good one but will not work with what I want to do as I cannot add the ID numbers to the combo page. As you stated in your response "given that your query has had in excess of 200 views and only 2 people have tried to help you..." I am going to just take it as this cannot be done and mark it as solved. Again Thank You very much to all those that even attempted to try this your hard work and time was greatly appreciated.

    Thanks for the help
    DeeJay

+ 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