+ Reply to Thread
Results 1 to 5 of 5

counta if not strikethrough

  1. #1
    Registered User
    Join Date
    11-20-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Post counta if not strikethrough

    I don't know if I need VBA for this solution and that's why I posted here first.

    I've got a simple spreadsheet. Two of the columns containing text require counting but not if the text is strikethrough.
    How can I exclude the strikethrough text from the cell count?

    Thanks.
    Mike

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: counta if not strikethrough

    Strikethrough, bold, color, and any other kind of formatting is not data to Excel.

    Add a column that controls the strikethrough formatting, and use that to control sums.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: counta if not strikethrough

    Or

    Try this UDF

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Please Login or Register  to view this content.
    In Excel use the UDF like this…

    =NonStriked(A1:A9)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: counta if not strikethrough

    That function, like any other, will not update when a cell is formatted to add or remove strikethrough.

    You're swimming upstream with that approach.

  5. #5
    Registered User
    Join Date
    11-20-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: counta if not strikethrough

    With a bit of alteration that worked perfectly.
    Thank you Sixthsense

+ 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. If then strikethrough
    By kosheboy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-25-2013, 04:49 PM
  2. [SOLVED] Strikethrough a specified row
    By fatalcore in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-15-2012, 09:22 AM
  3. strikethrough
    By herbzee in forum Excel General
    Replies: 7
    Last Post: 03-14-2006, 09:10 PM
  4. Re:strikethrough
    By newbie in forum Excel General
    Replies: 2
    Last Post: 07-17-2005, 09:05 PM
  5. Strikethrough on Excel. How?
    By Jerry Baritone in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-03-2005, 06:06 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