Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CT
 
Posts: n/a
Default Count the occurence of multiple (4 conditions). - Need urgent help

Hi,

I am unable to get the correct count using the formula :

=SUM(IF(A1:A999="
A",IF(D1:D999="Dd",IF(F1:F999="1",IF(E1:E999="1", 1,0)))))

I am trying to get no of records with
" A" values in Column A,
"Dd" values in Column D,
"1" values in Column F,
"1" values in Column E

and Sum all the counts- after applying the nested filters.


Can someone help me in debugging the same?
Will appreciate early response!

Thanks in advance,

  #2   Report Post  
Ragdyer
 
Posts: n/a
Default

Try this:

=SUMPRODUCT((A1:A999="A")*(D1:D999="Dd")*(E1:E999 =1)*(F1:F999=1))

I made an assumption that the 1's in Column E and F were real numbers, and
didn't need the quotes.

If I guessed wrong, and they are text, just add the quotation marks.


--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"CT" wrote in message
...
Hi,

I am unable to get the correct count using the formula :

=SUM(IF(A1:A999="
A",IF(D1:D999="Dd",IF(F1:F999="1",IF(E1:E999="1", 1,0)))))

I am trying to get no of records with
" A" values in Column A,
"Dd" values in Column D,
"1" values in Column F,
"1" values in Column E

and Sum all the counts- after applying the nested filters.


Can someone help me in debugging the same?
Will appreciate early response!

Thanks in advance,


  #3   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

You would have to array enter (Ctrl-Shift-Enter) this formula for it to
work. A simpler approach would use the fact that you can coerce TRUE
into 1 and FALSE into 0, so that the following formula should work and
does not require array entry:

=SUMPRODUCT((A1:A999="A")*(D1:D999="Dd")*(F1:F999 ="1")*(E1:E999="1"))

Jerry

CT wrote:

Hi,

I am unable to get the correct count using the formula :

=SUM(IF(A1:A999="
A",IF(D1:D999="Dd",IF(F1:F999="1",IF(E1:E999="1", 1,0)))))

I am trying to get no of records with
" A" values in Column A,
"Dd" values in Column D,
"1" values in Column F,
"1" values in Column E

and Sum all the counts- after applying the nested filters.


Can someone help me in debugging the same?
Will appreciate early response!

Thanks in advance,



  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

No need to array enter it

--
Regards,

Peo Sjoblom


"Jerry W. Lewis" wrote in message
...
You would have to array enter (Ctrl-Shift-Enter) this formula for it to
work. A simpler approach would use the fact that you can coerce TRUE into
1 and FALSE into 0, so that the following formula should work and does not
require array entry:

=SUMPRODUCT((A1:A999="A")*(D1:D999="Dd")*(F1:F999 ="1")*(E1:E999="1"))

Jerry

CT wrote:

Hi,

I am unable to get the correct count using the formula :

=SUM(IF(A1:A999="
A",IF(D1:D999="Dd",IF(F1:F999="1",IF(E1:E999="1", 1,0)))))

I am trying to get no of records with " A" values in Column A,
"Dd" values in Column D,
"1" values in Column F,
"1" values in Column E

and Sum all the counts- after applying the nested filters.
Can someone help me in debugging the same? Will appreciate early
response!

Thanks in advance,




  #5   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

The OP's formula

=SUM(IF(A1:A999="A",IF(D1:D999="Dd",IF(F1:F999="1 ",IF(E1:E999="1",1,0)))))

does require array entry to work, as I tried to say. I presume lack of
array entry is why CT could not get it to work.

My alternative formula

=SUMPRODUCT((A1:A999="A")*(D1:D999="Dd")*(F1:F999 ="1")*(E1:E999="1"))

does not require array entry, as I did say.

On rereading my previous reply, the object referred to by "this formula"
in my first sentence is not clear, and should probably have read "your
formula".

Jerry

Peo Sjoblom wrote:

No need to array enter it




  #6   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

I see that now, thanks for the clarification

--
Regards,

Peo Sjoblom


"Jerry W. Lewis" wrote in message
...
The OP's formula

=SUM(IF(A1:A999="A",IF(D1:D999="Dd",IF(F1:F999="1 ",IF(E1:E999="1",1,0)))))

does require array entry to work, as I tried to say. I presume lack of
array entry is why CT could not get it to work.

My alternative formula

=SUMPRODUCT((A1:A999="A")*(D1:D999="Dd")*(F1:F999 ="1")*(E1:E999="1"))

does not require array entry, as I did say.

On rereading my previous reply, the object referred to by "this formula"
in my first sentence is not clear, and should probably have read "your
formula".

Jerry

Peo Sjoblom wrote:

No need to array enter it



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
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
Count with multiple conditions Toby0924 Excel Worksheet Functions 3 February 2nd 05 01:35 PM
Count If Formula for multiple conditions?? How To?? LPrain Excel Worksheet Functions 1 December 6th 04 09:18 PM
Count Based upon Multiple Conditions hkslater Excel Worksheet Functions 4 November 19th 04 04:43 AM
Count rows based on multiple criteria Murph Excel Worksheet Functions 1 October 28th 04 07:13 AM


All times are GMT +1. The time now is 06:45 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"