+ Reply to Thread
Results 1 to 6 of 6

Formula to count only if number is negative

  1. #1
    Registered User
    Join Date
    12-11-2019
    Location
    California
    MS-Off Ver
    365
    Posts
    14

    Formula to count only if number is negative

    Hello,

    I am looking for a formula that will calculate only if the number is negative.

    In the attached spreadsheet, I have a Resource pool of 100 and a Contingency of 10. On FWs 28, 30, 31, 32, 33 and 34 (highlighted in Yellow), the number in Teams Available shows as a negative and is displayed in the chart below. I need those numbers to draw from the Contingency instead of showing as a negative.
    For instance:
    On FW 28, the Team Available is -4 and Contingency remains at 10. The Contingency should absorb the -4 and become 6, returning the Teams Available as a 0.
    On FW 30, the -3 in Teams Available should draw from the the Contingency of 10 - returning a Teams Available of 0, and Contingency of 7.

    At the same time, the same formula needs to NOT calculate the positive numbers so the Teams Available remains the same and Contingency remains at 10.

    Hopefully I explained that well enough! Any help offered would be greatly appreciated! I am not opposed to adding new lines or changing things in order to get the calculations needed.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to count only if number is negative

    There are no formulae in the attachment ... What is the formula you wish to adapt? Or have I misunderstood?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-11-2019
    Location
    California
    MS-Off Ver
    365
    Posts
    14

    Re: Formula to count only if number is negative

    Hi Ali,

    I do not need to adjust exisiting formulas, I don't think....I suspect I need to add 1 or two new formulas to get it to calculate correctly. Please see the new attachment with all the existing formulas and references.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to count only if number is negative

    In B11 drag copied across:

    =IF(B10-B12>0,10,10+B10-B12)

    In B13 drag copied across:

    =IF(B10-B12>0,B10-B12,0)

  5. #5
    Registered User
    Join Date
    12-11-2019
    Location
    California
    MS-Off Ver
    365
    Posts
    14

    Re: Formula to count only if number is negative

    So Simple! Thank you so much!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to count only if number is negative

    If that takes care of your original question, please select Thread Tools from the menu link above 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. How do I count the number of cells with negative values in a series
    By Scorpvin in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-15-2019, 07:22 PM
  2. Replies: 7
    Last Post: 07-10-2018, 01:05 PM
  3. Count negative numbers in row of data after the last positive number
    By jamintech in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-20-2017, 06:52 PM
  4. Count negative numbers in row of data after the last positive number
    By jamintech in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2017, 04:08 PM
  5. Replies: 3
    Last Post: 03-10-2016, 04:40 PM
  6. Count consecutive number of negative occurrences >=3
    By nbiggss in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-02-2012, 02:14 PM
  7. Count how many times a negative number occurs
    By basalisbury in forum Excel General
    Replies: 6
    Last Post: 04-05-2012, 10:29 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