Need help with Excel 2010

I have a column that will contain either an x, an x with a strike through or the cell will be blank. I want to count the number of cells only with an x.....exclude blanks and strike throughs. HELP!
Yep, my name really is Bob.
Parasound HCA1500A(indoor sound) and HCA1000(outdoor sound), Dynaco PAS4, Denon DP1200 w/Shure V15 Type V and Jico SAS stylus, Marantz UD7007, Polk L600, Rythmik L12 sub.

Comments

  • OleBoot
    OleBoot Posts: 2,818
    Go to Formulas tab, then Insert Function button on left, then select Countif.



    COUNTIF function

    This article describes the formula syntax and usage of the COUNTIFfunction in Microsoft Excel.

    Description

    The COUNTIF function counts the number of cells within a range that meet a single criterion that you specify. For example, you can count all the cells that start with a certain letter, or you can count all the cells that contain a number that is larger or smaller than a number you specify. For example, suppose you have a worksheet that contains a list of tasks in column A, and the first name of the person assigned to each task in column B. You can use the COUNTIF function to count how many times a person's name appears in column B and, in that way, determine how many tasks are assigned to that person. For example:

    =COUNTIF(B2:B25,"Nancy")

    Note To count cells based on multiple criteria, see COUNTIFS function.

    Syntax

    COUNTIF(range, criteria)

    The COUNTIF function syntax has the following arguments:

    range Required. One or more cells to count, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.


    criteria Required. A number, expression, cell reference, or text string that defines which cells will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".

    Note

    You can use the wildcard characters — the question mark (?) and the asterisk (*) — in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.


    Criteria are case insensitive; for example, the string "apples" and the string "APPLES" will match the same cells.



    Remarks

    The COUNTIF function returns incorrect results when you use it to match strings longer than 255 characters to the string #VALUE!.


  • muncybob
    muncybob Posts: 3,065
    Yep, I use countif. It will still count an x with a strike through. I've seen where enabling macros and some VBA gets the job donne but I can't seem to make it work.
    Yep, my name really is Bob.
    Parasound HCA1500A(indoor sound) and HCA1000(outdoor sound), Dynaco PAS4, Denon DP1200 w/Shure V15 Type V and Jico SAS stylus, Marantz UD7007, Polk L600, Rythmik L12 sub.
  • OleBoot
    OleBoot Posts: 2,818
    I am a) surprised that countif doesn't work, and b) didn't know how far along you were with the problem. Lucky that I am not bust at work today - quick gogole revealed this macro for counting strikethrough cells. So I guess use countif first, then the macro and subtract the result.

    Public Function CountStrike(pWorkRng As Range) As Long
    'Update 20140819
    Application.Volatile
    Dim pRng As Range
    Dim xOut As Long
    xOut = 0
    For Each pRng In pWorkRng
    If pRng.Font.Strikethrough Then
    xOut = xOut + 1
    End If
    Next
    CountStrike = xOut
    End Function