Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Mick & Clause & Experts Please help me on this issue one more time

I need help with the thread below."Countifs bites again"

https://groups.google.com/forum/?fro...ns/rDHn9VjHDlQ

I am using the following now, but i realised an error in my logic.
What needs to happen is that if the first 3 conditions are correct then I need to return the count of of all the columns AP8:AP107,AQ8:AQ107 & AR8:AR107 that
have a value <=500. So if eg ap8 is 450 and ar8 is 350 then the function needs to return 2 and so on.


=COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*", Sheet3!AO8:AO107,"*",Sheet3!AP8:AP107,"<=500",Shee t3!AQ8:AQ107,"<=500",Sheet3!AR8:AR107,"<=500")
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Mick & Clause & Experts Please help me on this issue one more time

Hi,

Am Tue, 26 Mar 2013 10:25:11 -0700 (PDT) schrieb Please work this
time...:

I am using the following now, but i realised an error in my logic.
What needs to happen is that if the first 3 conditions are correct then I need to return the count of of all the columns AP8:AP107,AQ8:AQ107 & AR8:AR107 that
have a value <=500. So if eg ap8 is 450 and ar8 is 350 then the function needs to return 2 and so on.

=COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*", Sheet3!AO8:AO107,"*",Sheet3!AP8:AP107,"<=500",Shee t3!AQ8:AQ107,"<=500",Sheet3!AR8:AR107,"<=500")


the formula above counts only if e.g. AP8 /AND/ AQ8 /AND/ AR8 are <=500
For your expected result you have to add:
=COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*", Sheet3!AO8:AO107,"*",Sheet3!AP8:AP107,"<=500")+
COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*",S heet3!AO8:AO107,"*",Sheet3!AQ8:AQ107,"<=500")+
COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*",S heet3!AO8:AO107,"*",Sheet3!AR8:AR107,"<=500")

or try it with SUMPRODUCT:
=SUMPRODUCT(((AP8:AP107<=500)+(AQ8:AQ107<=500)+(AR 8:AR107<=500))*(C8:C107<"")*(AH8:AH107<"")*(AO8: AO107<""))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Mick & Clause & Experts Please help me on this issue one more time

Thank for the prompt answer. I used your SUMPRODUCT formula above i have2 values that are lesst than 500 in AP8:AP107 & AR8:AR107 $350.00 & $450.00 but still the sumporduct is evulating as a 0. Can I use some other function?


On Tuesday, March 26, 2013 12:41:10 PM UTC-5, Claus Busch wrote:
Hi,



Am Tue, 26 Mar 2013 10:25:11 -0700 (PDT) schrieb Please work this

time...:



I am using the following now, but i realised an error in my logic.


What needs to happen is that if the first 3 conditions are correct then I need to return the count of of all the columns AP8:AP107,AQ8:AQ107 & AR8:AR107 that


have a value <=500. So if eg ap8 is 450 and ar8 is 350 then the function needs to return 2 and so on.




=COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*", Sheet3!AO8:AO107,"*",Sheet3!AP8:AP107,"<=500",Shee t3!AQ8:AQ107,"<=500",Sheet3!AR8:AR107,"<=500")




the formula above counts only if e.g. AP8 /AND/ AQ8 /AND/ AR8 are <=500

For your expected result you have to add:

=COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*", Sheet3!AO8:AO107,"*",Sheet3!AP8:AP107,"<=500")+

COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*",S heet3!AO8:AO107,"*",Sheet3!AQ8:AQ107,"<=500")+

COUNTIFS(Sheet3!C8:C107,"*",Sheet3!AH8:AH107,"*",S heet3!AO8:AO107,"*",Sheet3!AR8:AR107,"<=500")



or try it with SUMPRODUCT:

=SUMPRODUCT(((AP8:AP107<=500)+(AQ8:AQ107<=500)+(AR 8:AR107<=500))*(C8:C107<"")*(AH8:AH107<"")*(AO8: AO107<""))





Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Mick & Clause & Experts Please help me on this issue one more time

Hi,

Am Tue, 26 Mar 2013 11:02:32 -0700 (PDT) schrieb Please work this
time...:

Thank for the prompt answer. I used your SUMPRODUCT formula above i have2 values that are lesst than 500 in AP8:AP107 & AR8:AR107 $350.00 & $450.00 but still the sumporduct is evulating as a 0. Can I use some other function?


these values only will be counted if the cell in C, AH /and/ AO in the
same row are not empty.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Mick & Clause & Experts Please help me on this issue one more time

Hi,

Am Tue, 26 Mar 2013 19:07:31 +0100 schrieb Claus Busch:

these values only will be counted if the cell in C, AH /and/ AO in the
same row are not empty.


if you want to count the values in AP8:AR107 <= 500 without any other
condition, then try:
=COUNTIF(AP8:AR107,"<=500")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Mick & Clause & Experts Please help me on this issue one more time

Ok When i insert the following statement and restrict it to just one cell I get the correct answer which is 2. I am looking for "r" in these cells.
so this formula works fine but only for one cell at a time.

=SUMPRODUCT((Sheet3!AP8:AP8<=500)+(Sheet3!AQ8:AQ8< =500)+(Sheet3!AR8:AR8<=500))*(Sheet3!C8:C8<"*")*( Sheet3!AH8:AH8<"*")*(Sheet3!AL8:AL8<"*")

But when I try to expand my range by using the following formula I get a result of 299, I should only get 2 as only C8 & Ah8 & al8 have a value of "r" in ity and the rest of the rows are blank have empty cells in them.

=SUMPRODUCT((Sheet3!AP8:AP107<=500)+(Sheet3!AQ8:AQ 107<=500)+(Sheet3!AR8:AR107<=500))*(Sheet3!C8:C107 <"*")*(Sheet3!AH8:AH107<"*")*(Sheet3!AL8:AL107< "*")

Can you throw some light on it please. I do appreciate all your help.
On Tuesday, March 26, 2013 1:39:11 PM UTC-5, Claus Busch wrote:
Hi,



Am Tue, 26 Mar 2013 19:07:31 +0100 schrieb Claus Busch:



these values only will be counted if the cell in C, AH /and/ AO in the


same row are not empty.




if you want to count the values in AP8:AR107 <= 500 without any other

condition, then try:

=COUNTIF(AP8:AR107,"<=500")





Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2


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
Time issue MJKelly Excel Programming 6 November 19th 08 12:30 PM
Can I use a between clause or in clause on an IF statement ssciarrino Excel Programming 2 May 4th 07 04:48 PM
Excel format JOHN MICK to Text format "JOHN","MICK" John Excel Discussion (Misc queries) 4 July 20th 06 08:31 PM
"Between" in an IF clause gavin Excel Discussion (Misc queries) 5 May 2nd 05 09:27 PM
Run Time Issue Steph[_3_] Excel Programming 2 May 27th 04 08:07 PM


All times are GMT +1. The time now is 09:13 PM.

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"