+ Reply to Thread
Results 1 to 11 of 11

"" causing issues for COUNTIFS and SUMIFS

  1. #1
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    "" causing issues for COUNTIFS and SUMIFS

    I have an issue

    I have a column of data A:A
    Some cells are 'blank' and some have words in.
    The 'blank cells' I believe actually contain "", due to the results of a formula

    I wanted to COUNTIF cells weren't blank.
    I tried =COUNTA('2016'!A:A), but this doesn't work because of the "" results in the column cells.
    I also wanted to do some COUNTIFS and SUMIFS formulas where one of the conditions would be, but I can't because of the "".

    How do I work around this?
    I thought the following might work for counting the number of cells where A was not blank and B contained "Yes". But this failed.

    =SUMPRODUCT(--(LEN('2016'!A:A)>0)*'2016'!B:B="Yes")

    Any ideas of the workaround.

    Thanks so much.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: "" causing issues for COUNTIFS and SUMIFS

    Workbook, please, as always. Thanks!
    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
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: "" causing issues for COUNTIFS and SUMIFS

    Hi,

    If the entries in column A are only ever text, the null string ("") or genuine blanks (i.e. never numbers):

    =COUNTIF(A:A,"?*")

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: "" causing issues for COUNTIFS and SUMIFS

    Thanks.
    I was advised it was best not to attach examples, but to describe as best as possible in the forum as this makes the posts more searchable for future users. Sorry.
    Example attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: "" causing issues for COUNTIFS and SUMIFS

    Ah ha, this works
    =COUNTIF(A:A,"?*")

    What does the "?*" mean??

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: "" causing issues for COUNTIFS and SUMIFS

    I was advised it was best not to attach examples, ...
    By whom? I think you may have misunderstood. What you will have been advised is not JUST to attach an example, but also to explain in detail in your thread what the issue is and what you are looking for. You may also have been asked not to post an image, but a workbook instead. I hope this clarifies this forum's position for you.

  7. #7
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: "" causing issues for COUNTIFS and SUMIFS

    Ah ok, must have been my misunderstanding of what had happened in that thread. Thanks for the advice, most helpful - want to make sure I get etiquette correct as people are SO helpful here.

  8. #8
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: "" causing issues for COUNTIFS and SUMIFS

    Any ideas why

    This works: =COUNTIFS('2016'!R3:R200,"?*",'2016'!Q3:Q200,"Yes")

    BUT this gives an ERROR: =COUNTIFS('2016'!R3:R200,"?*",'2016'!$DD$3:$DN$200,'2016'!DF$2)

  9. #9
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: "" causing issues for COUNTIFS and SUMIFS

    Yes - this:

    '2016'!$DD$3:$DN$200

    It's not a single-column array.

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: "" causing issues for COUNTIFS and SUMIFS

    Maybe try

    =SUMPRODUCT((LEN('2016'!R3:R200)>0)*('2016'!$DD$3:$DN$200='2016'!D$2))

  11. #11
    Registered User
    Join Date
    12-04-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    79

    Re: "" causing issues for COUNTIFS and SUMIFS

    Thanks all

+ 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] Using CountIFS or SumIFS with "exact"
    By JoeT15 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-25-2018, 12:18 PM
  2. [SOLVED] Try to countifs and sumifs value with "-"
    By molittlemo in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 08-28-2017, 08:36 AM
  3. If "value" then copy from "cellA" to "cellB" drag down issues
    By mrmeeks in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2014, 12:34 PM
  4. [SOLVED] Countifs, Sumifs, is there another "ifs"?
    By Eldernurf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-24-2013, 09:19 AM
  5. [SOLVED] Macro "Sumifs" statement syntax issues...
    By herbie226 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2013, 07:24 PM
  6. Replies: 10
    Last Post: 01-26-2012, 08:26 AM
  7. can a "MINIF" formula be built, equivalent to "SUMIFS"?
    By jrtaylor in forum Excel General
    Replies: 4
    Last Post: 10-22-2011, 12:44 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