+ Reply to Thread
Results 1 to 15 of 15

Formula to meet multiple criteria and perform calculation

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    42

    Post Formula to meet multiple criteria and perform calculation

    Hello
    I have a data given below. I want to do the following-
    Define formula after Equipment-3 column such that, search which 'Product' use Equipment-1, then find highest 'weightage' among the product uses 'Equipment-1' and then pick the 'Dose' of the highest 'weightage' value product and muliply with 'batch' of the product in that row and divide by 'Dose in that row. Like in below case forrmula shall search that Product A & D uses R-50 and Product D has maximum Weighatge (64), Hence in row of product 'A' in cell next to 'Equipment-3', automatically formula shall multiply 'Dose' of D i.e. 250 with Batch of 'A' i.e. 150 and divide bby Dose of 'A' i.e. 5...This is to bbe done of each column "equipment-1, 2 and 3...so on. Please help

    Product Batch Dose weightage Equipment-1 Equipment-2 Equipment-3
    A 150 5 55 R-50
    B 60 100 61 R250
    c 500 1 54 R500
    D 200 250 61 R-50
    E 10 250 54 R500

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    01-16-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    42

    Re: Formula to meet multiple criteria and perform calculation

    I have attache an excel sheet for data. I have following request.

    In attached excel sheet, I want to define a formula in each cell of column ‘P’ (first in ‘P3’).
    I want to first search the products in (column A), which are having ‘Equipments’ populated in ‘column J’.
    For all products having equipments populated in column J, I want to find single maximum ‘weightage’ value in column G.
    The product which is having maximum ‘weightage’, I want to Multiply the ‘Dose’ value from ‘column C’; with B3 (Kg of first product)
    and divide by C3 (Dose of first product).

    In case more then one product found having maximum weightage (Column G value) , then formula shall consider the product having
    ‘Solubility’ (Column D) having higher value among the identified multiple products having highest weightage value.

    This formula will be defined for entire column P and corresponding product values will change (Column B ‘Kg’ for multiplication
    and Column C ‘Dose’ for division). Also similar search for other columns like K,L and so on shall be done and formula shall be
    defined in column column Q and R….

    Please suggest
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    Need to re-evaluate response
    Last edited by JohnTopley; 11-16-2016 at 06:23 AM.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    What happens when weight and solubility are the same?

  6. #6
    Registered User
    Join Date
    01-16-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    42

    Re: Formula to meet multiple criteria and perform calculation

    Weightage shall be highest, among more than one product with highest weightage, solubility with heighest value. Rrest of parameters has no impact.

    Please suggest

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    You did not answer the question:

    look your data for column K where Weighting and Solubility for all entries have same values (36 and 2) but dosage is different - so which dosage - the highest?

    Please add manual calculations to your file.
    Last edited by JohnTopley; 11-17-2016 at 02:02 AM.

  8. #8
    Registered User
    Join Date
    01-16-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    42

    Re: Formula to meet multiple criteria and perform calculation

    Dear Sir,

    I have attached the file again with exact requirement mentioned in text form. Hope this will clarify the requirement. Thanks for your quick response
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    I understand the logic but changes the value of "Weightage" ("Weighting"?) in your example ignores my question: any solution will assume there is a uniqure maximum weighting for any column.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    I used helper columns V:AB

    Formula

    =IF(J3<>"",($G3&$D3)+0,"") to give Weighting & Solubilty

    In P3

    =IF(J3<>"",INDEX($C3:$C14,MATCH(MAX(V3:V14),V3:V14,0))*$B3/$C3,"")

    Copy across and down
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-16-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    42

    Re: Formula to meet multiple criteria and perform calculation

    Thanks sir, its working. But is it possible to do it without using helper columns?
    Many thanks for your help

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    the formula in P3 was incorrect ...


    =IF(J3<>"",INDEX($C$3:$C$16,MATCH(MAX(V$3:V$16),V$3:V$16,0))*$B3/$C3,"")

    Without helper;

    IN P3

    =IF(J3<>"",INDEX($C$3:$C$16,MATCH(MAX(J$3:J$16<>"",$G$3:$G$16)&(MAX(IF($G$3:$G$16=MAX(J$3:J$16<>"",$G$3:$G$16),$D$3:$D$16))),$G$3:$G$16&$D$3:$D$16,0))*$B3/$C3,"")

    Enter with Ctrl+Shift+Enter

    Copy across and down
    Attached Files Attached Files
    Last edited by JohnTopley; 11-17-2016 at 12:00 PM.

  13. #13
    Registered User
    Join Date
    01-16-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    42

    Re: Formula to meet multiple criteria and perform calculation

    Thanks alot sir. Really appreciate your help.

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,146

    Re: Formula to meet multiple criteria and perform calculation

    Better

    =IF(J3<>"",INDEX($C$3:$C$16,MATCH(MAX(IF(J$3:J$16<>"",($G$3:$G$16&$D$3:$D$16)+0,"")),($G$3:$G$16&$D$3:$D$16)+0,0))*$B3/$C3,"")
    Attached Files Attached Files

  15. #15
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Formula to meet multiple criteria and perform calculation

    crossposted: http://www.ozgrid.com/forum/showthread.php?t=201810
    http://www.mrexcel.com/forum/excel-q...requested.html

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Last edited by alansidman; 12-03-2016 at 07:14 AM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Perform calculation on multiple matches ... where to start?
    By GraysonRobbins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2016, 01:20 PM
  2. [SOLVED] Counting cells that meet multiple single criteria as variable criteria
    By BillBasil in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-01-2016, 10:33 AM
  3. [SOLVED] Formula to Lookup Multiple Criteria in Two Worksheets and perform a Calculation v2
    By hammer2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-04-2015, 12:34 AM
  4. [SOLVED] Formula to Lookup Multiple Criteria in Two Worksheets and perform a Calculation
    By hammer2 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-03-2015, 02:30 AM
  5. Perform complex function on cells that meet two criteria
    By livelypilgrim in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-14-2014, 06:18 PM
  6. Replies: 4
    Last Post: 02-18-2014, 08:37 PM
  7. Formula to produce False if multiple cells don't meet complicated criteria
    By cheerockracy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-12-2011, 08:08 PM

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