+ Reply to Thread
Results 1 to 6 of 6

Help with CountIf (assuming it is countif)

  1. #1
    Registered User
    Join Date
    11-15-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    3

    Help with CountIf (assuming it is countif)

    Hi All,

    Been tasked with my boss to come up with a formula for the below:

    Stage 1 P Stage 2 P Stage 3 P Stage 4 P Stage 5 P Total Outstanding

    £1,850.00 P £12,500.00 £12,500.00 £56,250.00 £18,750.00

    The Total should be running total of all the stages, and when someone puts "p" in the other cell adjacent it will deduct that amount from the total. My boss says it's a countif formula, but that will only count the amount of times P occurs... I tried IF formulas but it doesn't seem to work.

    Can any one help please?

  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 2406
    Posts
    44,662

    Re: Help with CountIf (assuming it is countif)

    Will you please attach a sample Excel workbook? Please don't attach a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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

  3. #3
    Registered User
    Join Date
    11-15-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    3

    Re: Help with CountIf (assuming it is countif)

    Does this work?

    I have shortened the table as it has stages up to 9 plus others at the end so if the formula can be added to that would be fab.
    Gary
    Attached Files Attached Files

  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 2406
    Posts
    44,662

    Re: Help with CountIf (assuming it is countif)

    Use this & copy down:

    =IF(C4="","",SUMIF(D4:N4,"<>P",C4:K4))

  5. #5
    Registered User
    Join Date
    11-15-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    3

    Re: Help with CountIf (assuming it is countif)

    Awesome, Thanks Glenn! I was nearly there but I was including the first cell which was probably why it didn't work. is there a reason behind this?

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

    Re: Help with CountIf (assuming it is countif)

    You need to "match" the number with the presence or absence of a P. Therefore the range of the "P" criterion has to be offset by a column. In effect, if there's no P in the first cell in the range that it looks at (D4) it will add into the total the number in the first cell of the range that it looks at for the amounts (C4) and so on...
    Last edited by Glenn Kennedy; 11-15-2016 at 12:01 PM.

+ 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] match # against row, countif -1 otherwise countif
    By jackf-nc in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2016, 12:15 AM
  2. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  3. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  4. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  5. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  6. [SOLVED] COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  7. [SOLVED] Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05: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