Thread: Formula help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Formula help

Answer is correct as "D" is aligned with "4" not "A"

=SUMPRODUCT(--($A$1:$A$4="A"),--($B$1:$B$4=4))

Note there was bracket missing from your formula


"srain001" wrote:

Hi,

I am trying to create a formula to count information located in two separate
columns but appear in the same row. For example:

Column A Column B
A 1
B 2
C 3
D 4

What I'm trying to do is count every instance that "A" appears in the same
row as "4" at any given time. The current formula I'm working with is
=SUMPRODUCT(--$A$1:$A$4="A"),--($B$1:$B$4=4))

However, something must be wrong because I keep getting a count of 0 even
though I'm reference the right column and range.

Hope anyone can help!

Srain