Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default additional conditions to SUMPRODUCT formula

Hi

I wondered if anyone knew if I can add another condition to this formula.
=SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10&""))

I want to use the above formula if coloumn b contains c1

e.g

Coloumn A Coloumn B
1111 X
1111 X
1234 Y
1258 Z
1254 Y

I want to count Coloumn A (as detailed in the above formula) if Coloumn B
contains X (or cell C1)

Is that too many formulas?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
JCS JCS is offline
external usenet poster
 
Posts: 93
Default additional conditions to SUMPRODUCT formula

Hi Fiona,

I'm not sure why you would want to count column A when whatt you are
counting is in column B. If you are counting the x's in column B and
whatever the contents are in C1, the following formula should work:

=SUMPRODUCT((B1:B10="x")+(B1:B10=C1))

HTH,
John

"Fiona Yorke-Saville" wrote:

Hi

I wondered if anyone knew if I can add another condition to this formula.
=SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10&""))

I want to use the above formula if coloumn b contains c1

e.g

Coloumn A Coloumn B
1111 X
1111 X
1234 Y
1258 Z
1254 Y

I want to count Coloumn A (as detailed in the above formula) if Coloumn B
contains X (or cell C1)

Is that too many formulas?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default additional conditions to SUMPRODUCT formula

Thanks John but I wanted to count column A only if Coloumn B contains a
certiain letter. I wasn't sure if this was possible? The sumproduct formula
makes sure dupplicate numbers aren't counted but I couldn't figure out a way
to add a COUNTIF(B1:B10,x) in to the sumproduct one...?

"JCS" wrote:

Hi Fiona,

I'm not sure why you would want to count column A when whatt you are
counting is in column B. If you are counting the x's in column B and
whatever the contents are in C1, the following formula should work:

=SUMPRODUCT((B1:B10="x")+(B1:B10=C1))

HTH,
John

"Fiona Yorke-Saville" wrote:

Hi

I wondered if anyone knew if I can add another condition to this formula.
=SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10&""))

I want to use the above formula if coloumn b contains c1

e.g

Coloumn A Coloumn B
1111 X
1111 X
1234 Y
1258 Z
1254 Y

I want to count Coloumn A (as detailed in the above formula) if Coloumn B
contains X (or cell C1)

Is that too many formulas?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
JCS JCS is offline
external usenet poster
 
Posts: 93
Default additional conditions to SUMPRODUCT formula

Hi Fiona,

Don't know if you are still monitoring this posting, but try this formula:

"=IF(COUNTIF(B1:B5,""x"")0,SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10&"""")),IF(C1=""x"",SUMPRODUC T(1/COUNTIF(A1:A10,A1:A10&"""")))
)"

John





"Fiona Yorke-Saville" wrote:

Hi

I wondered if anyone knew if I can add another condition to this formula.
=SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10&""))

I want to use the above formula if coloumn b contains c1

e.g

Coloumn A Coloumn B
1111 X
1111 X
1234 Y
1258 Z
1254 Y

I want to count Coloumn A (as detailed in the above formula) if Coloumn B
contains X (or cell C1)

Is that too many formulas?

Thanks

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
Please help with Sumproduct, adding additional criteria Gina[_2_] Excel Worksheet Functions 5 October 1st 08 02:23 PM
Sumproduct with conditions JDB Excel Discussion (Misc queries) 2 March 15th 07 11:40 AM
SUMPRODUCT - Additional criteria Dewayne Excel Worksheet Functions 2 September 8th 06 06:43 PM
Additional Sumproduct Criterias lacosta Excel Worksheet Functions 3 October 3rd 05 09:55 PM
Additional Conditions for Conditional Formatting eric beck Excel Worksheet Functions 1 July 25th 05 06:47 AM


All times are GMT +1. The time now is 10:29 AM.

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"