Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
George
 
Posts: n/a
Default Counting based on other cells contents...

Hi,

I'm after a (fairly) complicated formula here. I have two three columns I'm
interested in. Column 1 contains three different values ("CGF","GGF","SGF"),
column 2 contains "Yes"/"No" and column 3 contains "Pass"/"Fail".

I'd like to count the number of times in the first column ($C:$C as I don't
know how many entries there are) for each value (GGF,CGF,SGF) that have a
"No" in column 2 as well.

I've tried This:

=COUNT(IF(($C:$C="GGF")&($D:$D="No"),1,0))

but with no luck.

Can anyone give me any pointers as to where I'm going wrong? I didn't want
to have to put a hidden column in as I believe Excel can achieve what I want
without the need for hidden columns.

Once I have this formula licked I should be able to translate it to cope
with each column 1 value, and the "Pass"/"Fail" values as well.

Thanks
George
  #2   Report Post  
bj
 
Posts: n/a
Default Counting based on other cells contents...

sounds like sum product would work
assuming they three columns are C,D and E
=sumproduct(--($C$1:$C$1000="CGF"),--($D$1:$D$1000="Yes"),--($E$1:#E#1000="Pass")
the "--()" changes a logic true false to a numeric 1 0.
the arrays in each section must be the same size but can not be the
shorthand for a full column (C:C won't work)

"George" wrote:

Hi,

I'm after a (fairly) complicated formula here. I have two three columns I'm
interested in. Column 1 contains three different values ("CGF","GGF","SGF"),
column 2 contains "Yes"/"No" and column 3 contains "Pass"/"Fail".

I'd like to count the number of times in the first column ($C:$C as I don't
know how many entries there are) for each value (GGF,CGF,SGF) that have a
"No" in column 2 as well.

I've tried This:

=COUNT(IF(($C:$C="GGF")&($D:$D="No"),1,0))

but with no luck.

Can anyone give me any pointers as to where I'm going wrong? I didn't want
to have to put a hidden column in as I believe Excel can achieve what I want
without the need for hidden columns.

Once I have this formula licked I should be able to translate it to cope
with each column 1 value, and the "Pass"/"Fail" values as well.

Thanks
George

  #3   Report Post  
George
 
Posts: n/a
Default Counting based on other cells contents...

bj,

Thanks very much for the information. I've just located the SUMPRODUCT
formula and it does work albeit with the addition that you said about
shorthand for a column not working. How frustrating!

Nevertheless this has answered the question to a tee. Now all I have to do
is work out what happens if someone puts values in that are outside the
formula range :-)

Thanks for your help...
George

"bj" wrote:

sounds like sum product would work
assuming they three columns are C,D and E
=sumproduct(--($C$1:$C$1000="CGF"),--($D$1:$D$1000="Yes"),--($E$1:#E#1000="Pass")
the "--()" changes a logic true false to a numeric 1 0.
the arrays in each section must be the same size but can not be the
shorthand for a full column (C:C won't work)

"George" wrote:

Hi,

I'm after a (fairly) complicated formula here. I have two three columns I'm
interested in. Column 1 contains three different values ("CGF","GGF","SGF"),
column 2 contains "Yes"/"No" and column 3 contains "Pass"/"Fail".

I'd like to count the number of times in the first column ($C:$C as I don't
know how many entries there are) for each value (GGF,CGF,SGF) that have a
"No" in column 2 as well.

I've tried This:

=COUNT(IF(($C:$C="GGF")&($D:$D="No"),1,0))

but with no luck.

Can anyone give me any pointers as to where I'm going wrong? I didn't want
to have to put a hidden column in as I believe Excel can achieve what I want
without the need for hidden columns.

Once I have this formula licked I should be able to translate it to cope
with each column 1 value, and the "Pass"/"Fail" values as well.

Thanks
George

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default Counting based on other cells contents...

If you have headers in row 1, you could use:

.... --($C$2:$C$65536="CGF"), ...

or just ignore that final row

.... --($C$1:$C$65535="CGF"), ...



George wrote:

bj,

Thanks very much for the information. I've just located the SUMPRODUCT
formula and it does work albeit with the addition that you said about
shorthand for a column not working. How frustrating!

Nevertheless this has answered the question to a tee. Now all I have to do
is work out what happens if someone puts values in that are outside the
formula range :-)

Thanks for your help...
George

"bj" wrote:

sounds like sum product would work
assuming they three columns are C,D and E
=sumproduct(--($C$1:$C$1000="CGF"),--($D$1:$D$1000="Yes"),--($E$1:#E#1000="Pass")
the "--()" changes a logic true false to a numeric 1 0.
the arrays in each section must be the same size but can not be the
shorthand for a full column (C:C won't work)

"George" wrote:

Hi,

I'm after a (fairly) complicated formula here. I have two three columns I'm
interested in. Column 1 contains three different values ("CGF","GGF","SGF"),
column 2 contains "Yes"/"No" and column 3 contains "Pass"/"Fail".

I'd like to count the number of times in the first column ($C:$C as I don't
know how many entries there are) for each value (GGF,CGF,SGF) that have a
"No" in column 2 as well.

I've tried This:

=COUNT(IF(($C:$C="GGF")&($D:$D="No"),1,0))

but with no luck.

Can anyone give me any pointers as to where I'm going wrong? I didn't want
to have to put a hidden column in as I believe Excel can achieve what I want
without the need for hidden columns.

Once I have this formula licked I should be able to translate it to cope
with each column 1 value, and the "Pass"/"Fail" values as well.

Thanks
George


--

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
moving cells based certain value Rose Davis New Users to Excel 1 August 29th 05 09:53 PM
exchange contents of cells \jeremy via OfficeKB.com\ New Users to Excel 6 July 8th 05 03:14 AM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
Subtract a group of cells from a total based on ending date Nicholas Scarpinato Excel Discussion (Misc queries) 0 May 17th 05 03:25 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM


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