Results 1 to 4 of 4

Excel formula to count cells with specific text

Threaded View

  1. #1
    Registered User
    Join Date
    02-26-2009
    Location
    STL MO USA
    MS-Off Ver
    Office 2007
    Posts
    8

    Question Excel formula to count cells with specific text

    Greetings

    =SUMPRODUCT((ISNUMBER(SEARCH("9P to 9A",A4:A1000)))*(B4:AC1000={"K"}))

    This formula counts "1" every time the string "K" is found in a range of rows which also contain another cell value "9P to 9A". Works great as far as I've found, although, it's probably a little complicated.

    Now I also want this formula to search for "Km" in addition to "K".

    I tried these and they didn't work:
    =SUMPRODUCT((ISNUMBER(SEARCH("9P to 9A",A4:A1000)))*(B4:AC1000=OR({"K"},{"Km"}))) <<value not found error
    =SUMPRODUCT((ISNUMBER(SEARCH("9P to 9A",A4:A1000)))*OR((B4:AC1000={"K"}),(B4:AC1000={"Km"}))) <<gave an incorrect result

    I've attached an edited version of the workbook.

    Can someone point me in the right direction?

    Thank you!
    Attached Files Attached Files
    Last edited by timtrace; 04-06-2011 at 12:32 AM. Reason: Removed screen cap and provided workbook at mod's suggestion. Thanks, Richard Buttrey.

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