#1   Report Post  
Lucien
 
Posts: n/a
Default Formula help please

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=SUMPRODUCT(--(F2:F276=3),--(Q2:Q2760))

Hope this helps!

In article ,
Lucien wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.

  #3   Report Post  
Lucien
 
Posts: n/a
Default

Domenic,

This formula gave me the same total as just counting F2:F276=3. It did not
give me the total of -- if F2:F276=3 then how many of Q2:Q276 are 0.



"Domenic" wrote:

Try...

=SUMPRODUCT(--(F2:F276=3),--(Q2:Q2760))

Hope this helps!

In article ,
Lucien wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.


  #4   Report Post  
Domenic
 
Posts: n/a
Default

Try the following formula instead...

=SUMPRODUCT(--(F2:F276=3),--(ISNUMBER(Q2:Q276)),--(Q2:Q2760))

Hope this helps!

In article ,
Lucien wrote:

Domenic,

This formula gave me the same total as just counting F2:F276=3. It did not
give me the total of -- if F2:F276=3 then how many of Q2:Q276 are 0.



"Domenic" wrote:

Try...

=SUMPRODUCT(--(F2:F276=3),--(Q2:Q2760))

Hope this helps!

In article ,
Lucien wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in
column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.


  #5   Report Post  
Marvin P. Winterbottom
 
Posts: n/a
Default

you need a 3rd column with this formula:
=if(f2=3,if(q20,1,0),0)
that column will have a 1 if f=3 and q0, or else 0, so just sum it

"Lucien" wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.



  #6   Report Post  
Excel_Geek
 
Posts: n/a
Default


You could create another column with this formula:

=IF(F2=3,IF(Q20,1,0),0)

This will mark each row with a 1 if both conditions are met. Then
simply sum up that third column.

I'm sure there are many other ways to do it, but this is quick, fast,
simple.


--
Excel_Geek


------------------------------------------------------------------------
Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423
View this thread: http://www.excelforum.com/showthread...hreadid=398410

  #7   Report Post  
Michael
 
Posts: n/a
Default

Hi Lucien
Is this what you are looking for ??

=COUNTIF(A1:A8,3)+COUNTIF(B1:B8,"0")

HTH
Michael Mitchelson


"Lucien" wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.

  #8   Report Post  
Michael
 
Posts: n/a
Default

Sorry
I used my sample cell locations instead of yours. Substitute yours for mine.
Regards
Michael Mitchelson


"Lucien" wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.

  #9   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 23 Aug 2005 14:45:45 -0700, Lucien
wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.



=SUMPRODUCT((F2:F276=3)*(Q2:Q2760))


--ron
  #10   Report Post  
Lucien
 
Posts: n/a
Default

All of the formula help from every one has been great. However, I am not
getting the correct answer based on the data. Maybe it is in my explanation
of what I need.
I want to search through F2:F276 for any cell that contains a 3.
Let's say that identifies 50 cells.
Then, from only those 50 cells, which of them have a qty 0 in column Q.
I want it to count the number of occurrences that this happens in one formula.

I apologize for any confusion I have caused and at the same time appreciate
the help received so far.

"Ron Rosenfeld" wrote:

On Tue, 23 Aug 2005 14:45:45 -0700, Lucien
wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.



=SUMPRODUCT((F2:F276=3)*(Q2:Q2760))


--ron



  #11   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 24 Aug 2005 09:39:04 -0700, Lucien
wrote:

All of the formula help from every one has been great. However, I am not
getting the correct answer based on the data. Maybe it is in my explanation
of what I need.
I want to search through F2:F276 for any cell that contains a 3.
Let's say that identifies 50 cells.
Then, from only those 50 cells, which of them have a qty 0 in column Q.
I want it to count the number of occurrences that this happens in one formula.

I apologize for any confusion I have caused and at the same time appreciate
the help received so far.


That is exactly what the formula I supplied (and some of the others) will do.

What do you get as a result if you use my formula?

What do you get if you use the formula =COUNTIF(F2:F276,3) ?

If you get the same results, can you identify a row which has a 3 in column F
and a 0 or negative number in column Q?






"Ron Rosenfeld" wrote:

On Tue, 23 Aug 2005 14:45:45 -0700, Lucien
wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.



=SUMPRODUCT((F2:F276=3)*(Q2:Q2760))


--ron


--ron
  #12   Report Post  
Lucien
 
Posts: n/a
Default

Ron,

Using the formula you and others supplied, my count is 181.
Using =COUNTIF(F2:F276,3) I also get 181.
There are a toatal of 115 rows that have both a 3 in column F and a number
greater than zero in Q.
There are 66 rows that have a 3 in column F and a zero or negative # in
column Q.

Another strange thing: I put an auto filter on the spreadsheet and filtered
column F to pull up all the "3"s. =181.
Then I tried a custom filter on column Q to show everything greater than 0.
No result. ...when there is actually 115 lines.




"Ron Rosenfeld" wrote:

On Wed, 24 Aug 2005 09:39:04 -0700, Lucien
wrote:

All of the formula help from every one has been great. However, I am not
getting the correct answer based on the data. Maybe it is in my explanation
of what I need.
I want to search through F2:F276 for any cell that contains a 3.
Let's say that identifies 50 cells.
Then, from only those 50 cells, which of them have a qty 0 in column Q.
I want it to count the number of occurrences that this happens in one formula.

I apologize for any confusion I have caused and at the same time appreciate
the help received so far.


That is exactly what the formula I supplied (and some of the others) will do.

What do you get as a result if you use my formula?

What do you get if you use the formula =COUNTIF(F2:F276,3) ?

If you get the same results, can you identify a row which has a 3 in column F
and a 0 or negative number in column Q?






"Ron Rosenfeld" wrote:

On Tue, 23 Aug 2005 14:45:45 -0700, Lucien
wrote:

I have a large spreadsheet that includes the following detail.
Column F has numerical values of either 1, 2, or 3 ranging from F2:F276.
Column Q has varying numerical values ranging from Q2:Q276.

I need one formula to count with this criteria:
Column F is 3 and
Column Q 0

So, I need it to count how many occurrences a line has both, a "3" in column
F and, the qty in column Q is greater than zero.

Any help would be greatly appreciated.


=SUMPRODUCT((F2:F276=3)*(Q2:Q2760))


--ron


--ron

  #13   Report Post  
Domenic
 
Posts: n/a
Default

Make sure that Column Q is not formatted as 'Text'. What does the
following formula return...

=COUNTIF(Q2:Q276,"?*")

In article ,
Lucien wrote:

Ron,

Using the formula you and others supplied, my count is 181.
Using =COUNTIF(F2:F276,3) I also get 181.
There are a toatal of 115 rows that have both a 3 in column F and a number
greater than zero in Q.
There are 66 rows that have a 3 in column F and a zero or negative # in
column Q.

Another strange thing: I put an auto filter on the spreadsheet and filtered
column F to pull up all the "3"s. =181.
Then I tried a custom filter on column Q to show everything greater than 0.
No result. ...when there is actually 115 lines.

  #14   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 25 Aug 2005 09:15:06 -0700, Lucien
wrote:

Ron,

Using the formula you and others supplied, my count is 181.
Using =COUNTIF(F2:F276,3) I also get 181.
There are a toatal of 115 rows that have both a 3 in column F and a number
greater than zero in Q.
There are 66 rows that have a 3 in column F and a zero or negative # in
column Q.

Another strange thing: I put an auto filter on the spreadsheet and filtered
column F to pull up all the "3"s. =181.
Then I tried a custom filter on column Q to show everything greater than 0.
No result. ...when there is actually 115 lines.


OK, the problem is that, contrary to what you wrote, the values in Column Q are
NOT numbers. Rather they are TEXT which happen to look like numbers.

Use this formula instead:

=SUMPRODUCT((F2:F276=3)*(Q2:Q2760)*ISNUMBER(Q2:Q2 76))


--ron
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
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Simplify formula Luke Excel Worksheet Functions 37 May 6th 05 07:21 AM
put formula results into a different cell if it is empty PutFormula Excel Worksheet Functions 2 February 11th 05 03:31 AM
how do i write a formula and keep in in formula form, so it DOESN. norcalchick2207 Excel Discussion (Misc queries) 2 February 4th 05 08:38 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 04:06 AM.

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

About Us

"It's about Microsoft Excel"