+ Reply to Thread
Results 1 to 5 of 5

Multiple conditions IF, percentage calculation on a range of cells

  1. #1
    Registered User
    Join Date
    10-22-2020
    Location
    Switzerland
    MS-Off Ver
    2016
    Posts
    4

    Multiple conditions IF, percentage calculation on a range of cells

    Dear community,

    It has been hours now since I am trying to solve an issue with a calculation. As you may see on the attached picture.
    I am trying to calculate a percentage based on multiple conditions on ranges of cells.

    I would like to calculate as follows: If the "item category" is [Fruit] and if there is a number in "Organic surface", then I would like to calculation the % of this specific fruit weight out of the sum of Fruit weight. (in this case 2 tons / (2 + 1 + 0.5) tons).
    I would like this formula to be valid for the whole ranges (2 : 12) for all columns.

    TEST_Excel.png

    I hope I am clear enough,
    Many many thanks for your support,
    DW
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,893

    Re: Multiple conditions IF, percentage calculation on a range of cells

    Put this formula in E2:

    =IF(OR(A2="-",D2="-"),"",C2/SUMIF($A$2:$A$12,A2,$C$2:$C$12))

    Note that you might need to use semicolons ( ; ) instead of commas ( , ) in the formula, depending on your regional settings.

    Format the cell as percentage, then copy down to E12.

    Hope this helps.

    Pete

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,844

    Re: Multiple conditions IF, percentage calculation on a range of cells

    % of what ?
    =IF(D2="-","",IF(D2<>"",SUMIF(A:A,A2,C:C))) in cell E2 and copy down, I'm assuming you can have an Organic Surface value for multiple Items
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    10-22-2020
    Location
    Switzerland
    MS-Off Ver
    2016
    Posts
    4

    Re: Multiple conditions IF, percentage calculation on a range of cells

    Many thanks Pete_UK. With the method you proposed, I then sum the percentages in the cell C14 and I get the overall % of organic fruit.
    However, what I was looking for is to make the condition on the [Fruit] as well since in column A it may either be [Fruit] or [Vegetable] at the end ...

    etaf, I am looking for the percentage of organic Fruit out of the total of fruits. And if a raw in the column "Organic surface" has a number, then it means that the related fruit is organic.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,896

    Re: Multiple conditions IF, percentage calculation on a range of cells

    If I understand your response to Pete_UK then it would seem you are looking for a formula such as the following:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If the above formula doesn't work then it may help if you could upload another .xlsx file that illustrates where Pete's and/or my formula fails.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Counting percentage of month with multiple conditions
    By MrExcelsior in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-11-2019, 02:03 PM
  2. Multiple percentage calculation through VBA
    By brajesh.sharma87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-05-2018, 09:34 AM
  3. If / Then statement with multiple conditions for range of cells
    By micina in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2017, 05:54 PM
  4. True/False for Multiple conditions and formats in a range of cells
    By Vatoemperor in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-13-2015, 03:51 PM
  5. [SOLVED] Percentage calculation based on multiple date criteria
    By odahilys in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-26-2015, 10:10 AM
  6. Replies: 1
    Last Post: 01-13-2013, 08:39 PM
  7. Median calculation on multi-range with conditions
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2011, 03:32 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