Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If 0, count various codes in a range on another sheet

I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if not
0, then nothing.


Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default If 0, count various codes in a range on another sheet

N38: =IF(N370,COUNTIF(data!A1:A7,"*PQ*"),"")

HTH

Bob

"Steve" wrote in message
...
I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if
not
0, then nothing.


Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default If 0, count various codes in a range on another sheet

Try this formula in N38:
=IF(AND(N370,COUNTIF(range,"PQ")=2),"2 PQ","")
replace the word range with the actual range on the other sheet you'll be
looking for PQ in. I've assumed PQ will be on its own in the cells where it
exists.

If you wanted to do the whol elot in cell N37:
=IF(AND(SUM(G37:M37)/50,COUNTIF(range,"PQ")=2),"2 PQ","")

Basil

"Steve" wrote:

I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if not
0, then nothing.


Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If 0, count various codes in a range on another sheet

I can't get it to work. One thing I see that I may not have been clear on, is
that the formula appears to be using 2 as an absolute. What I meant to
indicate is that the number of times the PQ is in the specific range may be
1,2, 3 any number of times. So I want to count how many times it's in the
range. Such as -
1 PQ, or 2 PQ, or 3 PQ, etc.

Thanks again,

"Basil" wrote:

Try this formula in N38:
=IF(AND(N370,COUNTIF(range,"PQ")=2),"2 PQ","")
replace the word range with the actual range on the other sheet you'll be
looking for PQ in. I've assumed PQ will be on its own in the cells where it
exists.

If you wanted to do the whol elot in cell N37:
=IF(AND(SUM(G37:M37)/50,COUNTIF(range,"PQ")=2),"2 PQ","")

Basil

"Steve" wrote:

I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if not
0, then nothing.


Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default If 0, count various codes in a range on another sheet

Try:
=IF(AND(N370,COUNTIF(range,"PQ")0),COUNTIF(range ,"PQ")&"PQ","")

or you can use a variant of what Bob entered with what is above if it still
doesn't work.

B

"Steve" wrote:

I can't get it to work. One thing I see that I may not have been clear on, is
that the formula appears to be using 2 as an absolute. What I meant to
indicate is that the number of times the PQ is in the specific range may be
1,2, 3 any number of times. So I want to count how many times it's in the
range. Such as -
1 PQ, or 2 PQ, or 3 PQ, etc.

Thanks again,

"Basil" wrote:

Try this formula in N38:
=IF(AND(N370,COUNTIF(range,"PQ")=2),"2 PQ","")
replace the word range with the actual range on the other sheet you'll be
looking for PQ in. I've assumed PQ will be on its own in the cells where it
exists.

If you wanted to do the whol elot in cell N37:
=IF(AND(SUM(G37:M37)/50,COUNTIF(range,"PQ")=2),"2 PQ","")

Basil

"Steve" wrote:

I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if not
0, then nothing.

Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If 0, count various codes in a range on another sheet

I couldn't get this one to work, so I tried Bobs.

"Basil" wrote:

Try:
=IF(AND(N370,COUNTIF(range,"PQ")0),COUNTIF(range ,"PQ")&"PQ","")

or you can use a variant of what Bob entered with what is above if it still
doesn't work.

B

"Steve" wrote:

I can't get it to work. One thing I see that I may not have been clear on, is
that the formula appears to be using 2 as an absolute. What I meant to
indicate is that the number of times the PQ is in the specific range may be
1,2, 3 any number of times. So I want to count how many times it's in the
range. Such as -
1 PQ, or 2 PQ, or 3 PQ, etc.

Thanks again,

"Basil" wrote:

Try this formula in N38:
=IF(AND(N370,COUNTIF(range,"PQ")=2),"2 PQ","")
replace the word range with the actual range on the other sheet you'll be
looking for PQ in. I've assumed PQ will be on its own in the cells where it
exists.

If you wanted to do the whol elot in cell N37:
=IF(AND(SUM(G37:M37)/50,COUNTIF(range,"PQ")=2),"2 PQ","")

Basil

"Steve" wrote:

I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if not
0, then nothing.

Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If 0, count various codes in a range on another sheet

This one worked to give me the # of PQ's. Thanks,

But I tried to add to it &text to get the # of PQ's & the text PQ, but I
couldn't figure it out.

I'd like the result to be 1 PQ

Thanks again,

Steve

"Bob Phillips" wrote:

N38: =IF(N370,COUNTIF(data!A1:A7,"*PQ*"),"")

HTH

Bob

"Steve" wrote in message
...
I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if
not
0, then nothing.


Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve



.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default If 0, count various codes in a range on another sheet

=IF(N370,COUNTIF(data!A1:A7,"*PQ*"),"") & " PQ"

Or simply custom format to 0 " PQ"


Gord Dibben MS Excel MVP

On Fri, 8 Jan 2010 12:03:01 -0800, Steve
wrote:

This one worked to give me the # of PQ's. Thanks,

But I tried to add to it &text to get the # of PQ's & the text PQ, but I
couldn't figure it out.

I'd like the result to be 1 PQ

Thanks again,

Steve

"Bob Phillips" wrote:

N38: =IF(N370,COUNTIF(data!A1:A7,"*PQ*"),"")

HTH

Bob

"Steve" wrote in message
...
I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if
not
0, then nothing.

Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve



.


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default If 0, count various codes in a range on another sheet

Pefect,

Thanks,

Steve

"Gord Dibben" wrote:

=IF(N370,COUNTIF(data!A1:A7,"*PQ*"),"") & " PQ"

Or simply custom format to 0 " PQ"


Gord Dibben MS Excel MVP

On Fri, 8 Jan 2010 12:03:01 -0800, Steve
wrote:

This one worked to give me the # of PQ's. Thanks,

But I tried to add to it &text to get the # of PQ's & the text PQ, but I
couldn't figure it out.

I'd like the result to be 1 PQ

Thanks again,

Steve

"Bob Phillips" wrote:

N38: =IF(N370,COUNTIF(data!A1:A7,"*PQ*"),"")

HTH

Bob

"Steve" wrote in message
...
I have this formula in N37 =SUM(G37:M37)/5
If the above result is 0, I want to count the number of times a specific
code(PQ) is in a specific range on another worksheet, and in cell N38, I'd
like the result to be, if PQ occurs 2 times in that range, 2 PQ. And if
not
0, then nothing.

Something like. If N370, countif(data!A1:A7*PQ*,"")
So the result in the sample would be 2 PQ
A
s
s
pq
pq
s
s
s

Thanks

Steve


.


.

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
Count occurences of same zip codes Outlook, eh? Excel Worksheet Functions 2 December 15th 09 08:25 PM
Countif over a range of cells for various codes. AJ Excel Worksheet Functions 1 November 30th 09 02:50 PM
Looking up a value within a range of 3 letter or number codes Jimmy Excel Worksheet Functions 4 June 6th 08 07:11 PM
Looking up a value within a range of 3 letter or number codes... Jimmy Excel Worksheet Functions 6 June 4th 08 07:16 PM
How do I count alpha codes in a range of cells in a row? Barbarosa Excel Discussion (Misc queries) 1 February 7th 06 04:19 PM


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