+ Reply to Thread
Results 1 to 9 of 9

Formula to get min and max with conditions

  1. #1
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    115

    Formula to get min and max with conditions

    I need to add 2 equations in the PivotTable Calculated filed

    1. Minimum Qty
    If Sales qty (column B) / 12 is less than or equal 2. The result should be 2.
    If sales qty (column B) / 12 is greater than 2 and less than 4. The result should be 4.
    If sales qty (column B) / 12 more than 4. The result should be sales/4.
    If Item code (column A), the first 4 letter are ?FLOD?. The result should take the above results and divided by 3.

    Example:
    Row 66 58/12 = 5. Hence the Minimum Qty is 5
    Row 68 31/ 12 = 3. Hence the Minimum Qty is 4
    Row 83 (1964/12)/3 = 164. Hence the Minimum Qty is 55

    2. Order Qty
    Stock qty (Column C) minus Minimum Qty
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to get min and max with conditions

    Hi. Before we get going on this one...

    Is your forum profile showing the Excel PRODUCT that you need this request to work with?

    The best solutions often rely on knowing WHICH Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date. If you aren't sure, in Excel go to File/Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent Excel PRODUCTS are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the Version number in your profile (e.g. MS365 (PC) Version 2211). The version number is in the About Excel section further down the Account page.

    Cheers,

    Glenn.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    115

    Re: Formula to get min and max with conditions

    Hello

    it's Microsoft Office 365 Version 2301

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to get min and max with conditions

    Please update your profile NOW to show that.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to get min and max with conditions

    Since you have a nice new O365... why not use a dyanmic array that updates automatically, instead of a dead old pivot table???


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    115

    Re: Formula to get min and max with conditions

    Dear Gleen,

    I would like to thank you for your appreciated efforts.
    I don't have that much experience to the dynamic array, but I can use the pivot table easily.
    I thought that there is a formula to be embedded in pivot table would be easier. Cause I have different sheet and I want to apply only the formula instead of asking many times.
    But I will try to understand your formula, and apply it.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to get min and max with conditions

    ... And I'm not good at Pivot Tables, I don't like them and don't use them.


    The formula is actually reasonably simple. The only bit you need to change is the bit in red:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    All the bits that start with a letter (B, C, D...) are just components - relatively simple mini-formulae. The bit in blue puts them all together. If you're interested in learning/using it, I can explain further...

  8. #8
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    115

    Re: Formula to get min and max with conditions

    Dear Glenn,

    thanks a lot for your support and appreciated efforts.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to get min and max with conditions

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] Formula with multiple conditions, if met then apply various percentage formula
    By JenniferGibbons1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-14-2021, 09:24 AM
  2. [SOLVED] Help for IF conditions with multiple Conditions (scenario more than 5 conditions)
    By meily_o26 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-16-2019, 02:13 AM
  3. Assistance with CountIF formula and additional formula conditions
    By solios in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-18-2016, 01:46 PM
  4. Replies: 2
    Last Post: 01-14-2016, 03:53 PM
  5. [SOLVED] How to add 2 conditions to a Formula or modify existing formula
    By Frank121977 in forum Excel General
    Replies: 9
    Last Post: 12-22-2012, 03:13 PM
  6. If formula with many conditions
    By gnoke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2010, 08:00 AM
  7. how can we put these conditions in formula?
    By zeeshan_mirza in forum Excel General
    Replies: 1
    Last Post: 07-28-2009, 02:48 AM

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