#1   Report Post  
Posted to microsoft.public.excel.misc
Debbie via OfficeKB.com
 
Posts: n/a
Default if and or statements

Hi, I have the following statement that works for what I need HOWEVER I now
need to also count the number of times "4.04" u2:u226 contains . I can't
figure out how to add this extra search criteria.

=SUM((COUNTIF(U2:U46,"3.028")+COUNTIF(U62:U226,"3. 028"))/COUNTA(U2:U46,U62:
U226))

I have column T2:t460 that contains product 3000, 4000,5000, 6000, 8000.
Then in column U2:u460 I have various versions. I need to figure the
percentage of 3000 & 5000 that equal 3.028 or 4.04 thanks for any help you
can offer.

--
Message posted via http://www.officekb.com
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default if and or statements

=(SUMPRODUCT(COUNTIF(U2:U46,{"3.028","4.04"}))+
SUMPRODUCT(COUNTIF(U62:U226,{"3.028","4.04"})))/COUNTA(U2:U46,U62:U226)

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Debbie via OfficeKB.com" <u21726@uwe wrote in message
news:61ad47bef543b@uwe...
Hi, I have the following statement that works for what I need HOWEVER I

now
need to also count the number of times "4.04" u2:u226 contains . I

can't
figure out how to add this extra search criteria.


=SUM((COUNTIF(U2:U46,"3.028")+COUNTIF(U62:U226,"3. 028"))/COUNTA(U2:U46,U62:
U226))

I have column T2:t460 that contains product 3000, 4000,5000, 6000, 8000.
Then in column U2:u460 I have various versions. I need to figure the
percentage of 3000 & 5000 that equal 3.028 or 4.04 thanks for any help

you
can offer.

--
Message posted via http://www.officekb.com



  #3   Report Post  
Posted to microsoft.public.excel.misc
Debbie via OfficeKB.com
 
Posts: n/a
Default if and or statements

Bob - Thank you soooo much. This works fabulously! I just have one more
question if you have time to answer. What do the { } brackets indicate as
opposed to ( )?

Bob Phillips wrote:
=(SUMPRODUCT(COUNTIF(U2:U46,{"3.028","4.04"}))+
SUMPRODUCT(COUNTIF(U62:U226,{"3.028","4.04"})))/COUNTA(U2:U46,U62:U226)

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

Hi, I have the following statement that works for what I need HOWEVER I now
need to also count the number of times "4.04" u2:u226 contains . I can't
figure out how to add this extra search criteria.


=SUM((COUNTIF(U2:U46,"3.028")+COUNTIF(U62:U226,"3 .028"))/COUNTA(U2:U46,U62:
U226))

I have column T2:t460 that contains product 3000, 4000,5000, 6000, 8000.
Then in column U2:u460 I have various versions. I need to figure the
percentage of 3000 & 5000 that equal 3.028 or 4.04 thanks for any help you
can offer.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200606/1
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default if and or statements

Hi Debbie,

The curly brackets are used to contain an array of constant values, so the
COUNTIF works on the array, that is both 3.028 and 4.04, rather than a
single value

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Debbie via OfficeKB.com" <u21726@uwe wrote in message
news:61b5ba85cc4f6@uwe...
Bob - Thank you soooo much. This works fabulously! I just have one more
question if you have time to answer. What do the { } brackets indicate as
opposed to ( )?

Bob Phillips wrote:
=(SUMPRODUCT(COUNTIF(U2:U46,{"3.028","4.04"}))+
SUMPRODUCT(COUNTIF(U62:U226,{"3.028","4.04"})))/COUNTA(U2:U46,U62:U226)

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

Hi, I have the following statement that works for what I need HOWEVER I

now
need to also count the number of times "4.04" u2:u226 contains . I

can't
figure out how to add this extra search criteria.



=SUM((COUNTIF(U2:U46,"3.028")+COUNTIF(U62:U226,"3 .028"))/COUNTA(U2:U46,U62:
U226))

I have column T2:t460 that contains product 3000, 4000,5000, 6000,

8000.
Then in column U2:u460 I have various versions. I need to figure the
percentage of 3000 & 5000 that equal 3.028 or 4.04 thanks for any help

you
can offer.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200606/1



  #5   Report Post  
Posted to microsoft.public.excel.misc
Debbie via OfficeKB.com
 
Posts: n/a
Default if and or statements

Bob, Excellent, I can't thank you enough for this information!!!

Bob Phillips wrote:
Hi Debbie,

The curly brackets are used to contain an array of constant values, so the
COUNTIF works on the array, that is both 3.028 and 4.04, rather than a
single value

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

Bob - Thank you soooo much. This works fabulously! I just have one more
question if you have time to answer. What do the { } brackets indicate as

[quoted text clipped - 22 lines]
percentage of 3000 & 5000 that equal 3.028 or 4.04 thanks for any help you
can offer.


--
Message posted via http://www.officekb.com
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
if statements, and statements Sum Limit and marking Excel Worksheet Functions 3 March 29th 06 03:25 PM
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
"IF Statements in Microsoft Excel Kathy Excel Discussion (Misc queries) 5 December 5th 05 05:02 PM
Linking two IF statements together trixma Excel Discussion (Misc queries) 2 September 29th 05 06:07 AM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM


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