Results 1 to 4 of 4

Array Formula Question

Threaded View

  1. #1
    Registered User
    Join Date
    07-10-2007
    Posts
    3

    Array Formula Question

    I have a list of words.

    I need to count how many of those words are made using ONLY the letters D, O, and G (not case sensitive).

    For example, if the list of words was:

    dog, toe, go, dot, got, god, get, doe, Do

    the formula should return the value 4 (dog, go, god, Do).

    I know I could hash this out with regex in a VBA macro, but I was hoping there was an easier way to get this done with a formula (there's no regex in an excel formula, right?).

    I've tried using some pretty ugly array formulas, where I sort of "brute force" every possible combination, such as...
    {=sum(IF(OR(A1:A15="D",A1:A15="O",A1:A15="G",A1:A15="DO",A1:A15="DG",A1:A15="OD",A1:A15="OG",A1:A15="GO",A1:A15="GD",A1:A15="DOG",A1:A15="DGO",A1:A15="ODG",A1:A15="OGD",A1:A15="GOD",A1:A15="GDO"),1,0))}
    but it just gives me either a 1 or a 0.

    I'm working on Excel 2007 if it matters.

    Any help is appreciated, thanks!
    Last edited by wpt394; 03-10-2008 at 05:29 AM.

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