+ Reply to Thread
Results 1 to 14 of 14

CountIf blank with two columns

  1. #1
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    CountIf blank with two columns

    Hi,

    I need help counting cells if blank. I have two columns E and J . For example if E5 and J5 are both blank I want that to count as 1.


    Appreciate the help.

    Gibs

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: CountIf blank with two columns

    This should work
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-25-2008
    Location
    Mount Joy, PA
    MS-Off Ver
    2003
    Posts
    44

    Re: CountIf blank with two columns

    If I understand you right, I think you need something like this

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: CountIf blank with two columns

    For example if E5 and J5 are both blank I want that to count as 1.
    Using a helper column, put this formula into the cell

    =AND(LEN(E5)=0,LEN(J5)=0)

    This will return TRUE or FALSE
    Count the TRUE values.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  5. #5
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    Re: CountIf blank with two columns

    Quote Originally Posted by whallgren View Post
    If I understand you right, I think you need something like this

    Please Login or Register  to view this content.
    Thanks for the reply. But this formula does not work correctly.


    Column E total not blank = 2308
    Column J total not blank = 1911

    Your formula gives a total not blank = 2605

    The total has to be below 1911. As the not blank fields will not match exactly. One or the other column could be blank, therefore giving a lesser value than the lowest I have.

    Thanks,

    Gibs

  6. #6
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    Re: CountIf blank with two columns

    Quote Originally Posted by Palmetto View Post
    Using a helper column, put this formula into the cell

    =AND(LEN(E5)=0,LEN(J5)=0)

    This will return TRUE or FALSE
    Count the TRUE values.

    Hi Thanks for the quick reply.

    I tried your formula but it only returns "False" no count.

    Thanks,

    Gibs

  7. #7
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    Re: CountIf blank with two columns

    Quote Originally Posted by quekbc View Post
    This should work
    Please Login or Register  to view this content.
    Hi,

    Thanks for the fast reply. I tried your formula but it appears to only check row 5 ?

    I need to check from row 2 to 5,000.

    Anyway it returns the value 0 (zero). Cells E5 and J5 are not blank. It should at least return 1 I would think. But the formula does not work.

    Thanks,

    Gibs

  8. #8
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: CountIf blank with two columns

    I need help counting cells if blank. I have two columns E and J . For example if E5 and J5 are both blank I want that to count as 1.
    The formula I gave you will return TRUE only if both cells are in fact blank, which includes no invisible space characters.

    Perhaps you should provide a more clear explanation of your requirements. Do both cells on the same row need to be blank or just any cells in the columns.

  9. #9
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    Re: CountIf blank with two columns

    Quote Originally Posted by Palmetto View Post
    The formula I gave you will return TRUE only if both cells are in fact blank, which includes no invisible space characters.

    Perhaps you should provide a more clear explanation of your requirements. Do both cells on the same row need to be blank or just any cells in the columns.
    Hi,

    I want to count rows 2 to 5,000. Columns E and J.

    I gave an example. If E2 and J2 are both blank I want that to count as 1.

    If E9 is blank and J9 is not blank, count as 0.

    Column E and J must not be blank on the same row to count as 1. I need a total.


    Gibs

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: CountIf blank with two columns

    Your information is contradicting..one minute you say count blanks, the next minute you say count non-blanks... you have done that more than once in this thread... wallgreen's formula counts when both are blank... change the

    =SUMPRODUCT(--(E2:E5000=""),--(J2:J5000="")) this counts blanks

    =SUMPRODUCT(--(E2:E5000<>""),--(J2:J5000<>"")) this counts non-blanks
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  11. #11
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    Re: CountIf blank with two columns

    Quote Originally Posted by NBVC View Post
    Your information is contradicting..one minute you say count blanks, the next minute you say count non-blanks... you have done that more than once in this thread... wallgreen's formula counts when both are blank... change the

    =SUMPRODUCT(--(E2:E5000=""),--(J2:J5000="")) this counts blanks

    =SUMPRODUCT(--(E2:E5000<>""),--(J2:J5000<>"")) this counts non-blanks
    Yeah thanks for pointing that out in an assinine way. That's because I have to explain over and over with three formulas that dont work! READ THE TITLE COUNTIF BLANK!!!

    Gibs

  12. #12
    Registered User
    Join Date
    10-06-2008
    Location
    Bangkok
    Posts
    19

    Re: CountIf blank with two columns

    Quote Originally Posted by NBVC View Post
    Your information is contradicting..one minute you say count blanks, the next minute you say count non-blanks... you have done that more than once in this thread... wallgreen's formula counts when both are blank... change the

    =SUMPRODUCT(--(E2:E5000=""),--(J2:J5000="")) this counts blanks

    =SUMPRODUCT(--(E2:E5000<>""),--(J2:J5000<>"")) this counts non-blanks
    Yes this one --> =SUMPRODUCT(--(E2:E5000<>""),--(J2:J5000<>"")) seems to work.

    Thank you,

    Gibs

  13. #13
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: CountIf blank with two columns

    The more i read this the more confused i am.

    Both formula should work.

    It's more of a question of the result being the result that you actually want (i.e. count blanks or count non-blanks).

  14. #14
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: CountIf blank with two columns

    Quote Originally Posted by gibs
    Yeah thanks for pointing that out in an assinine way. That's because I have to explain over and over with three formulas that dont work! READ THE TITLE COUNTIF BLANK!!!
    Please watch your tone - people are here to help you at no cost to yourself - have the courtesy to be polite.

    Regards your point that the formulas didn't work and your title and subsequent:

    Quote Originally Posted by gibsongk55 View Post
    Yes this one --> =SUMPRODUCT(--(E2:E5000<>""),--(J2:J5000<>"")) seems to work.
    note that the above does the complete opposite to the requirements inferred by both thread title and original post - ie it counts rows in which neither cell is blank.

    On that basis, FWIW, you could also use:

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 02-26-2010 at 04:55 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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