Counting using data from 2 columns

D

darbs

I need to count the number of rows which have a particular date in column A
and then a particular name in column J, I have tried countif formula but can
not get it to work. Basically i need to count all the rows that contain the
"Daily Telegraph" in column J as well as containing say "25 JUL" IN COLUMN A,
any ideas?
 
E

Eduardo

Opps, too many "0" in the 2nd part of the formula, use

=COUNTIF(J1:J100,"Daily Telegraph")+COUNTIF(A1:A100,"25 JUL")
 
D

darbs

Thank you. sorry, dont think I explained myself well - this works but not
correctly

I have 24 rows that contain 25 Jul in column A and out of these 19 contain
daily telegraph in column J and thats the number i am looking for but instead
this formula is giving me 72 as it is adding 24 from column a to the 48(total
number of rows in column J that contain daily telgraph)

Hope this is clearer.

Thanks
 
E

Eduardo

Hi,
I misunderstood use

=SUMPRODUCT((J1:J100="Daily Telegraph")+(A1:A100="25 JUL"))
 
E

Eduardo

Opps, again same mistake use this formula

=SUMPRODUCT(--(J1:J100="Daily Telegraph"),--(A1:A100="25 JUL"))
 
D

Don Guillett

Assuming your 25 Jul is TEXT

=sumproduct((a2:a22="25 July")*(j2:j22="daily telegraph"))
 
D

darbs

Tried both of these and its just returning 0

Don Guillett said:
Assuming your 25 Jul is TEXT

=sumproduct((a2:a22="25 July")*(j2:j22="daily telegraph"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 
D

darbs

Tried both of these and its just returning 0
Eduardo said:
Opps, again same mistake use this formula

=SUMPRODUCT(--(J1:J100="Daily Telegraph"),--(A1:A100="25 JUL"))
 
E

Eduardo

Hi,
check if you don't have any blank space, the text in the formula has to be
exactly the same as in the column
 
E

Eduardo

Hi,
if there is a blank space you can ride off it doing in another column

=trim(A1)

then copy this result in column A pasting as values
 
D

darbs

sorry it is a date

Don Guillett said:
Is your 25 Jul really a date or TEXT???
You failed to tell us.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top