Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Problem 4

Status
Not open for further replies.

RAClarke

Instructor
Sep 3, 2001
51
GB
I have an Excel spreadsheet that needs to count the number of x's in column 1. However the totals depend on the gender of the client - what sort of formula could do this?

Name Gender 1
----------------------------
Dominic M X
Rebecca F X
Richard M
Jade F X

Total Males 1
Total Females 2
 
=SUM((A2:A5="m")*(B2:B5="x"))

This formula will work but must be entered as an array formula. To do that, you type the formula in and while still INSIDE the cell, hit Ctrl-Shift-Enter (instead of the usual Enter). Your formula will then look like this:

{=SUM((A2:A5="m")*(B2:B5="x"))}

Do not type the curly brackets. They appear because you hit Ctrl-Shift-Enter.


techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
Dreamboat,

That is just so neat that it deserves a star!

pjm
 
That is really neat, but why does it work?

I also give you a star.
 
Dreamboat
I sent a star too as both these web sites look extremely useful. Thanks for sharing your magic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top