Stupid excel question
February 13, 2009 1:34 PM Subscribe
Excel question: Need formula to COUNT cells WHERE text is NOT "foo" or "bar"
This would be so simple in SQL but I can't figure out the formula in Excel. Let's say I have one column whose entries are mostly "foo" and "bar", but also miscellaneous stuff like "tator", "fedora", and some blank cells. I want to group the other values into an "other" category, but I won't always be able to predict what they are.
This is a really small spreadsheet (less than 100 rows) so I don't want to bother with Access.
posted by desjardins to computers & internet (16 answers total) 2 users marked this as a favorite
So you'd want =if(A1="foo","foo","other").
If you want to include bar as well, you could double up with =if(A1="foo","foo",if(A1="bar","bar","other"))
With the second if-statement only being referenced if A1 is not foo.
posted by shaun uh at 1:45 PM on February 13, 2009