+ Reply to Thread
Results 1 to 7 of 7

Forcing a summed value to be between a range of numbers

  1. #1
    Forum Contributor
    Join Date
    01-06-2019
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    209

    Forcing a summed value to be between a range of numbers

    Hello I have this code and I want to force the sum of the numbers generated in the array to be between a certain number range e.g >=111 <=170.
    Please Login or Register  to view this content.
    I have tried this formula in the cell

    =IF(SUMIF(B6:G6,">=111, <=170")=0,"",SUMIF(B6:G6,">=111, <=170")), but all it gives me is a zero regardless of the number being between 111 and 170

    Thank you for your help
    Last edited by UltimateNeo; 03-16-2019 at 08:14 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Forcing a summed value to be between a range of numbers

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    01-06-2019
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    209

    Re: Forcing a summed value to be between a range of numbers

    That gives 111 if the answer is 85 so only gives values between 111 and 170 it dose not force the code to run for rows that are not in the criteria.

    When the code runs it will only accept rows that meet the criteria of being >=111 and <=170 .it should then re run but only on the rows that haven't met the criteria

    For i = 6 To 30 for all these rows from 6 to 30 should be between >=111 and <=170 row 6 is B6:G6 and so forth until it gets to row B30:G30

    Thank you for your help

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Forcing a summed value to be between a range of numbers

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

  5. #5
    Forum Contributor
    Join Date
    01-06-2019
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    209
    Quote Originally Posted by TMS View Post
    Then maybe
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    But that would show true and false not the value between 111 and 170

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Forcing a summed value to be between a range of numbers

    Can you not work it out from there?

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

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Forcing a summed value to be between a range of numbers

    I want to force the sum of the numbers generated in the array to be between a certain number range e.g >=111 <=170
    I read this as you wanted numbers lower than 111 to be rounded up to 111 and numbers above 170 to be rounded down to 170.

    If I’m honest, I don't understand the description of how your code works, hence the second attempt.

    Third time lucky?

+ 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] after fulfilling several conditions numbers should be summed in a single cell
    By peterschein in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-08-2018, 03:15 AM
  2. Replies: 3
    Last Post: 04-13-2018, 01:51 AM
  3. [SOLVED] Is there a way to ensure all numbers in a column are summed?
    By Curious Dude in forum Excel General
    Replies: 5
    Last Post: 03-23-2017, 05:00 PM
  4. Replies: 4
    Last Post: 05-07-2015, 02:56 PM
  5. Numbers pasted cannot be summed
    By torontoem4o in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-03-2013, 12:16 PM
  6. Forcing numbers stored as text back to numbers
    By Gunther Maplethorpe in forum Excel General
    Replies: 5
    Last Post: 01-19-2011, 06:02 PM
  7. Can rounded numbers be summed without rounding errors?
    By chelseab in forum Excel General
    Replies: 1
    Last Post: 02-08-2006, 12:30 AM

Tags for this Thread

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