+ Reply to Thread
Results 1 to 6 of 6

Count cells that exceed X else sum until exceed X and count forward

  1. #1
    Registered User
    Join Date
    11-17-2020
    Location
    Slovenia
    MS-Off Ver
    2017
    Posts
    2

    Count cells that exceed X else sum until exceed X and count forward

    Hello,
    I'm trying to calculate the number of deliveries based on demands per month. The minimum order is 1,5
    I want to count months where demand is higher than 1,5. If it is not I want to sum two or more months (have to one after another) and then count them too. That will give me the number of orders I have to place in a certain year.
    Example below:

    demand
    jan.21 feb.21 mar.21 apr.21 maj.21 jun.21 jul.21 avg.21 sep.21 okt.21 nov.21 dec.21
    0,5 2 2,4 0,8 1 2,3 0,9 1,2 1,2 2 0,5 1,5

    minimum order Q: 1,5
    No of orders: X

    Thanks

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,775

    Re: Count cells that exceed X else sum until exceed X and count forward

    try
    =countif(A2:L2, ">"&1.5)
    Assuming the numbers for each month start at A2 and ends in L2
    If it is not I want to sum two or more months (have to one after another) and then count them too.
    dont know what you mean
    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.

  3. #3
    Registered User
    Join Date
    09-10-2015
    Location
    London
    MS-Off Ver
    365 at work, 2016 at home
    Posts
    79

    Re: Count cells that exceed X else sum until exceed X and count forward

    I can't get a sample workbook to upload, the attachment button in reply is having a javascript issue so describing locations is annoying but here goes.


    Assuming date headers are in row1 and your data line is in row 2, on row 3 under feb so b3:
    Please Login or Register  to view this content.
    The A formula is obviously a little different, and you then just need a simple count at the end of the row.

    It's not very elegant, and you may need more nesting depending on the depth/complexity of your data. but it gets the job done.
    If you have lots of lines of the same data, you'd need to insert a workings line for each line of data, start from scratch with a better way.
    Mainly hoping I've understood what you were after and that that will help the next person solve.

  4. #4
    Registered User
    Join Date
    11-17-2020
    Location
    Slovenia
    MS-Off Ver
    2017
    Posts
    2

    Re: Count cells that exceed X else sum until exceed X and count forward

    Thanks, but I am not sure this answers my request.
    I want to count the number of orders when demand is higher than 1,5. Each new order has to be higher than 1.5 and if it is not higher then I have to add up demands from two or more months.

    Lest say in JAN we have 0,5 and in FEB we have 2, therefore, his is 1 order in JAN (for both months since JAN is lower than 1.5). In MAR we have 2,4 (higher than 1.5), therefore, we have another order in MAR and so on ...
    At the end of the year, I have to count number of orders based on demand by each month. I hope you understand the logic.

    I started with COUNTIF. But I don't know how to put arguments.

    Sorry I can't or do not know how to upload a photo.

    Thanks

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,775

    Re: Count cells that exceed X else sum until exceed X and count forward

    I want to count the number of orders when demand is higher than 1,5. Each new order has to be higher than 1.5
    thats what the count formula will do As posted in previous post
    =countif(A2:L2, ">"&1.5)
    Assuming the numbers for each month start at A2 and ends in L2
    and if it is not higher then I have to add up demands from two or more months.
    I still don't know what this means exactly , did you read the yellow banner on how to add a file , as i would need some examples on how this 2nd part works exactly

  6. #6
    Registered User
    Join Date
    09-10-2015
    Location
    London
    MS-Off Ver
    365 at work, 2016 at home
    Posts
    79

    Re: Count cells that exceed X else sum until exceed X and count forward

    the simple count I suggested adding at the end of the row gives you your final answer, the nested if just works out order by order if it's big enough.

+ 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] Count rows that meet or exceed changeable % and divide by constant number
    By acasper3 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-23-2012, 02:29 PM
  2. how do I ensure that the sum of two cells does not exceed a set fi
    By lennysc14 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. how do I ensure that the sum of two cells does not exceed a set fi
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 06:05 AM
  4. how do I ensure that the sum of two cells does not exceed a set fi
    By lennysc14 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] how do I ensure that the sum of two cells does not exceed a set fi
    By lennysc14 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. [SOLVED] how do I ensure that the sum of two cells does not exceed a set fi
    By lennysc14 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] how do I ensure that the sum of two cells does not exceed a set fi
    By lennysc14 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. [SOLVED] how do I ensure that the sum of two cells does not exceed a set fi
    By lennysc14 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2005, 07:05 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