Counting

N

NotSoYoung

I have a woksheet with a column titled reference source. This column
can contains up to 45 different advertising sources. Due to a change in
methodology I now have some reference sources with two different
identifications. I need a formula that will combine the two different
id's for the same reference source.
Hope this is clear enough to understand my question.

Thanks

nsy
 
J

Jerry W. Lewis

Your subject says "Counting", so I will guess that you want to count the
number of occurences of either ID.

=COUNTIF(range,id1)+COUNTIF(range,id2)

Jerry
 
N

NotSoYoung

Jerry,
Thanks that works well. However, I failed to mention that one set of id
are alphanumeric and the other set of ids are numbers. When I use the
formula I count the numbers but not the alphanumeric. How can I
correct this?

Thanks

nsy
 
J

Jerry W. Lewis

=COUNTIF(range,5) counts cells that contain numeric 5
=COUNTIF(range,"5") counts cells that contain string 5
=COUNTIF(range,A2) counts cells that equal the value in A2 (regardless
of data type)

Jerry
 
P

Peo Sjoblom

Jerry,



=COUNTIF(range,5)

will count both numeric and text 5s since countif cannot distinguish between
the 2
you would need sumproduct to do that

=SUMPRODUCT(--(range=5))

or

=SUMPRODUCT(--(range="5"))
 

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