Counting 2 columns

want to learn

New Member
Joined
Aug 25, 2007
Messages
33
I need your help!
I have a column (Lets say A) with dates in it and a column (Lets say B) with names in it. I want a formula for counting column A if it = "certain date" and column B if it is = "certain name. Ex, How many times on 8/1/2007 did "john" appear.
Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi

Probably needs to change to make it a little more dynamic, but I created this with the Conditonal Sum wizard...
New Microsoft Excel Worksheet.xls
ABCD
1DateNameCount
201/01/2007John2
301/01/2007John
402/01/2007John
503/01/2007Mike
604/01/2007MIke
705/01/2007John
805/01/2007John
Sheet1


HTH :)
 
Upvote 0
It does work, you can see the example above...

Did you CTRL, SHIFT & ENTER the formula in C2? (See the { }'s?)
 
Upvote 0
I do not understand the CTRL, SHIFT & ENTER but i did remove the {}'s.
I believe you, it does work on yours.
Here is what I have. =SUM(IF($A$2:$A$8=DATEVALUE("1/1/2007"),IF($B$2:$B$8="John",1,0),0))
 
Upvote 0
Try:

=SUMPRODUCT((TEXT($A$2:$A$8,"dd/mm/yy")="01/01/07")^1,($B$2:$B$8="John")^1)

This doesn't require ctrl + shift + enter

Regards
Jon
 
Upvote 0
Entering a formula with CTRL, SHIFT & ENTER (instead of just ENTER) creates an array formula and encloses it in chevrons ({}'s) which are needed for the formula to work...

Learn more about array formulas here

If your going to need a lot of formulas then you maybe better off trying one of the SUMPRODUCT soloutions though...

:)
 
Upvote 0
Thanks, Jon von der Heyden That worked.

JazzSP8,
I still would like to know what I am doing wrong on the other formula.
 
Upvote 0
See above in case you missed it, we posted at the same time :)
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top