+ Reply to Thread
Results 1 to 11 of 11

Counting cells in on column minus cell from anohter

  1. #1
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Counting cells in on column minus cell from anohter

    Hi
    I am trying write a formula that will count the cell in column "J" with certain words total them and then minus the number of cells in column ''E" with a certain word. This is my formula but it does not come up with the correct total.
    =COUNTIF(Table!J:J,"Pending Closure")+COUNTIF(Table!J:J,"Pending Report Response")+COUNTIF(Table!J:J,"Closed - Done")-COUNTIF(Table!E:E,"Cancel")

    It should come up with 14.

    The words in column "J" add to 16 and then it should minus the number of times the word "Cancel" appears in column "E" which is 2, so I should get a total of 14. The formula returns the number 3.

    Thanks
    Ralph

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Counting cells in on column minus cell from anohter

    can we see a copy of the spreadsheet with any personal data removed

    any spaces before or after the text in the columns which may be giving you an incorrect result
    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
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Counting cells in on column minus cell from anohter

    Hi sure I have attached it
    Attached Files Attached Files

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Counting cells in on column minus cell from anohter

    i get 3

    COUNTIF(J:J,"Pending Closure")
    COUNTIF(J:J,"Pending Report Response")
    COUNTIF(J:J,"Closed - Done")
    COUNTIF(E:E,"Cancel")

    2
    2
    12
    -13

    Total 3

    I get the 16
    BUT E has more than 2 Cancel

    OR do you only want Cancel in E - when the other conditions are true
    Last edited by etaf; 03-14-2016 at 04:50 PM.

  5. #5
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Counting cells in on column minus cell from anohter

    Hi
    Sorry, I should have said that. I only want to subtract Cancel when the other conditions are true. So it should look like
    2
    2
    12
    -2
    Total 14

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Counting cells in on column minus cell from anohter

    you will probably need to use a COUNTIFS()

    And Subtract each one of these

    COUNTIFS(J:J,"Pending Closure",E:E,"Cancel")
    COUNTIFS(J:J,"Pending Report Response",E:E,"Cancel")
    COUNTIFS(J:J,"Closed - Done",E:E,"Cancel")

    there maybe a better way using sumproduct or arrays
    so will need to look into that

  7. #7
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Counting cells in on column minus cell from anohter

    Sorry that did not work.

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Counting cells in on column minus cell from anohter

    works for me
    =COUNTIF(J:J,"Pending Closure")
    +COUNTIF(J:J,"Pending Report Response")
    +COUNTIF(J:J,"Closed - Done")
    -COUNTIFS(J:J,"Pending Closure",E:E,"Cancel")
    -COUNTIFS(J:J,"Pending Report Response",E:E,"Cancel")
    -COUNTIFS(J:J,"Closed - Done",E:E,"Cancel")
    Attached Files Attached Files

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Counting cells in on column minus cell from anohter

    Alternative
    =SUM(COUNTIF(J:J,{"Pending Closure","Pending Report Response","Closed - Done"}))-SUM(COUNTIFS(J:J,{"Pending Closure","Pending Report Response","Closed - Done"},E:E,"cancel"))

  10. #10
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Counting cells in on column minus cell from anohter

    Hi it did work, thank you.

  11. #11
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Counting cells in on column minus cell from anohter

    you are welcome, thanks for the rep

+ 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. Counting some of the cells in one column IF the cell in another column is true
    By Jeep326 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2013, 02:53 AM
  2. Counting cells with colour fill, minus the cells with text
    By Crappy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-30-2013, 03:20 AM
  3. Replies: 14
    Last Post: 09-06-2012, 12:16 PM
  4. Replies: 3
    Last Post: 09-06-2012, 10:17 AM
  5. how to link up from one cell to anohter and another
    By eman7209 in forum Excel General
    Replies: 1
    Last Post: 06-19-2011, 04:53 PM
  6. Selecting an entire column minus two cells.
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-23-2011, 10:00 AM
  7. [SOLVED] Update cell value from anohter worksheet
    By mardo@jippii.fi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2006, 09:25 AM
  8. how do you count a column minus dupicates minus blanks.
    By notEXCELing in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2005, 08:48 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