Counting Multiple Variables in Excel

0

Posted by tribeofa | Posted in MS Excel | Posted on 06-14-2009

I don’t use the full range of Excel, and the people who create it don’t think like I do. Those two factors make the directions difficult for me to follow. Halfway through I’m thinking “What are they going on about??” It just isn’t how I would do it. If you have the same problem and have figured out a few tricks, send them in. Here’s one of my own:

Sometimes I need to count more that one variable in a line, but I can never remember the formula. I finally saved a small spreadsheet with the formula in and called it, “How to Count Multiple Variables in Excel.” Imaginative, aren’t I? If you can’t remember it either, use this formula:

=IF(AND(D3=”d”,E3 =”yes”), 1, “0″)

That means if cell D3 consists of the letter “d” and the cell E3 has the word “yes,” count it. If not, enter “0.” The last set of quotations is for the value “if false.” If you leave out the zero and just use:

=IF(AND(D3=”d”,E3 =”yes”), 1, “”)

Excel will leave the cell blank if both variables are not true.

Of course you would use your own cell numbers and entries.

Click into a blank cell at the end of the column you’ve been entering this formula into and choose “Autosum.” You can find this by clicking on ∑ in your toolbar, by choosing “function” from the insert menu (or pane in 2008), or right clicking then choosing “insert function.” If you use one of the latter methods, you’ll then need to choose “sum.” If you click on ∑ and haven’t pulled down to another choice recently, it will default to “sum.” One click totals! Any way you do it, you’ll have the total number of rows that meet your criterion of having both the specified variables. Clever bugger, isn’t it?

Have an Excel question? Send it in here. More about Excel:

Excel Wiki

Reversing Last Name First Lists into a Single Excel Column

Counting Check Marks

Everything Pasted into One Cell!

How to View Excel on Multiple Monitors

Did you find what you were looking for? If not, let us know what you were looking for!
Yes (0) No (0) Partly (0)
If you enjoyed this post, make sure you subscribe to my RSS feed!

Related Posts:

Write a comment

All comments are moderated due to excessive spam. Your (undoubtedly spam-free, legitimate and insightful) comment will appear as soon as someone has a chance to read it.

Spam protection by WP Captcha-Free

Add to Technorati Favorites

Social Widgets powered by AB-WebLog.com.

Tribe of Admins on LinkedIn MacHighway - Web Hosting for Mac Users, by Mac Users, Since 1997 Creative Commons License
This work by Melody KirkWagner is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.
Permissions beyond the scope of this license may be available at http://tribeofadmins.com/contact.