+ Reply to Thread
Results 1 to 6 of 6

How to apply "strikethrough" as criteria for countif?

  1. #1
    Registered User
    Join Date
    05-02-2018
    Location
    SLC, Utah
    MS-Off Ver
    2016
    Posts
    5

    How to apply "strikethrough" as criteria for countif?

    I have a long list that gets updated often. I need to count up multiple recurring items in the list. I need to be able to ignore hidden rows like "subtotal" or "aggregate" can, but I also need to be able to ignore cells with a strikethrough over the text.

    I've seen VBA code that will count the strikethroughs for me, but this is not what I need. I need the ability to make "strikethrough" or "No-strikethrough" be a criteria for a function like "countif" or "countifs".

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to apply "strikethrough" as criteria for countif?

    COUNTIF and COUNTIFS do not have any option to consider formatting, and neither does any other built-in Excel function. You have to use VBA.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-02-2018
    Location
    SLC, Utah
    MS-Off Ver
    2016
    Posts
    5

    Re: How to apply "strikethrough" as criteria for countif?

    Is there a way to adjust the code for the function? Or would I need to write my own countif type function to include it?

  4. #4
    Registered User
    Join Date
    05-02-2018
    Location
    SLC, Utah
    MS-Off Ver
    2016
    Posts
    5

    Re: How to apply "strikethrough" as criteria for countif?

    So, I may have solved part of my problem.
    I found some VBA code that would allow me to count strikethroughs in a list, so if I create another column where each cell results with either "Complete" or "incomplete" corresponding to whether the item in that row (from my original list) has a strikethrough or not, then I can use "Countifs" with multiple criteria including the column of Complete's or Incompletes.

    But now, by using "COUNTIFS", I am unable to ignore hidden rows. Any thoughts on solution there?

  5. #5
    Registered User
    Join Date
    05-02-2018
    Location
    SLC, Utah
    MS-Off Ver
    2016
    Posts
    5

    Re: How to apply "strikethrough" as criteria for countif?

    "exceljet.net/formula/count-visible-rows-only-with-criteria"

    I found a link that appears to give a possible solution, but I can't figure out how to be able to apply multiple criteria from multiple ranges here the same way that COUNTIFS allows.

    I am unable to post the link apparently because I'm new, but the gist is this:

    =SUMPRODUCT((range=criteria)*(SUBTOTAL(3,OFFSET(range,rows,0,1))))

  6. #6
    Registered User
    Join Date
    05-02-2018
    Location
    SLC, Utah
    MS-Off Ver
    2016
    Posts
    5

    Re: How to apply "strikethrough" as criteria for countif?

    I have figured out a solution that will work for me.

    I used a COUNTIFS function with multiple criteria from multiple ranges. In one column, I had my main list. In another column I used a VBA function to state "complete" if the corresponding item in the list was crossed out. In a 3rd column I used another VBA function to determine row height, and if its height was not 0, then it would output "visible". Based on using those columns, the COUNTIFS function worked just fine.

+ 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. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  2. Replies: 2
    Last Post: 05-09-2016, 04:05 PM
  3. Replies: 6
    Last Post: 02-04-2016, 05:51 AM
  4. Replies: 35
    Last Post: 01-13-2016, 02:16 AM
  5. Need to apply filter by contain all text as "mathew" in column "D"
    By aleanboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2014, 08:47 AM
  6. [SOLVED] problem with =COUNTIF((OFFSET(INDIRECT(CONCATENATE(("'Quality Audit Criteria'!$f$",MATCH(
    By nadiac2402 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2014, 08:22 AM
  7. "IF" statement & "strikethrough" formatting
    By jijy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2006, 03:00 PM

Tags for this Thread

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