#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Formula help

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula help

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

--
Gary's Student
gsnu200704


"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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formula help

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Formula help

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Formula help

You need to fix your parentheses:

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

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"srain001" wrote:

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formula help

Nope.

maybe...

=SUMPRODUCT(--(Sheet1!$A$1:$A$4="A"),--($B$1:$B$4=4))
or
=SUMPRODUCT(--(Sheet1!$A$1:$A$4="A"),--(sheet1!$B$1:$B$4=4))

depending on where your data is.

If it still doesn't work, it's best to copy the formula from the formula bar and
paste it into the newsgroup post. Then typing errors won't be added.

srain001 wrote:

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Formula help

Hi,

It still gives me a count of zero. I've input the formula exactly as
written, yet nothing. I'm at a loss... Columns are right, range is
right...I don't know what I'm doing wrong...

Here's the formula I'm using again. I don't see any errors...

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

Steph

"Dave F" wrote:

You need to fix your parentheses:

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

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"srain001" wrote:

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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

--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Formula help

Is it possible that the 4 in your data is formatted as text? If so, format
the numbers as numbers, not text.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"srain001" wrote:

Hi,

It still gives me a count of zero. I've input the formula exactly as
written, yet nothing. I'm at a loss... Columns are right, range is
right...I don't know what I'm doing wrong...

Here's the formula I'm using again. I don't see any errors...

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

Steph

"Dave F" wrote:

You need to fix your parentheses:

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

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"srain001" wrote:

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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

--

Dave Peterson



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Formula help


BINGO!!!!

Thanxs so much!

Steph
"Dave Peterson" wrote:

Nope.

maybe...

=SUMPRODUCT(--(Sheet1!$A$1:$A$4="A"),--($B$1:$B$4=4))
or
=SUMPRODUCT(--(Sheet1!$A$1:$A$4="A"),--(sheet1!$B$1:$B$4=4))

depending on where your data is.

If it still doesn't work, it's best to copy the formula from the formula bar and
paste it into the newsgroup post. Then typing errors won't be added.

srain001 wrote:

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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

--

Dave Peterson


--

Dave Peterson

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula help

Is there any reason why you don't just concatenate both fields and
then use a countif function?


srain001 wrote:
Hi,

It still gives me a count of zero. I've input the formula exactly as
written, yet nothing. I'm at a loss... Columns are right, range is
right...I don't know what I'm doing wrong...

Here's the formula I'm using again. I don't see any errors...

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

Steph

"Dave F" wrote:

You need to fix your parentheses:

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

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"srain001" wrote:

Hi,

Thanx. I had the () at the right spot. My post was a typo....!! In any
case, I'm still not getting a proper count. I should have mentionned that
the values I'm counting are in another worksheet. Here's what I have:
=SUMPRODUCT(--(Sheet1$A$1:$A$4="A"),--($B$1:$B$4=4)

Does this make any sense?

Steph

"Dave Peterson" wrote:

Watch your ()'s:

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

If this doesn't help, look for leading or trailing spaces in the values in
column A. And see if the values in column B are really numbers. You can use
=isnumber(b4) to see true/false.


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

--

Dave Peterson


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 08:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"