A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

OR or ARRAY help



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2007, 02:06 PM posted to microsoft.public.excel.worksheet.functions
Bigfoot17
external usenet poster
 
Posts: 41
Default OR or ARRAY help

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.
  #2  
Old February 19th, 2007, 02:35 PM posted to microsoft.public.excel.worksheet.functions
Toppers
external usenet poster
 
Posts: 3,081
Default OR or ARRAY help

TRY:

=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))

HTH

"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.

  #3  
Old February 19th, 2007, 02:38 PM posted to microsoft.public.excel.worksheet.functions
mike
external usenet poster
 
Posts: 3,942
Default OR or ARRAY help

Try this

=SUMPRODUCT(((F8:F57="W/M")*(D857="ABC"))+(D857="LMN")+(D857="XYZ "))

"Toppers" wrote:

TRY:

=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))

HTH

"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.

  #4  
Old February 19th, 2007, 02:38 PM posted to microsoft.public.excel.worksheet.functions
Roger Govier
external usenet poster
 
Posts: 2,602
Default OR or ARRAY help

Hi

Try the non-array entered formula

=SUMPRODUCT(($F$8:$F$57="W/M")*($C$8:$C$57={"XYZ","ABC","LMN","QRS"}))

--
Regards

Roger Govier


"Bigfoot17" wrote in message
...
I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are
"XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.



  #5  
Old February 19th, 2007, 02:40 PM posted to microsoft.public.excel.worksheet.functions
Martin Fishlock
external usenet poster
 
Posts: 428
Default OR or ARRAY help

Hi Big Foot:

Try using sum product with the ors added together and then checked if larger
than 0.

=SUMPRODUCT(
--($F$8:$F$57="W/M"),
--(
(--($D$8:$D$57="XYZ")
--($D$8:$D$57="ABC")
--($D$8:$D$57="LMN")
)0)
)
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.

  #6  
Old February 19th, 2007, 02:40 PM posted to microsoft.public.excel.worksheet.functions
mike
external usenet poster
 
Posts: 3,942
Default OR or ARRAY help

Sorry missed one of the conditions

=SUMPRODUCT(((F8:F57="W/M")*(D857="ABC"))+(D857="LMN")+(D857="XYZ")+ (D857="QRS"))

"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.

  #7  
Old February 19th, 2007, 03:01 PM posted to microsoft.public.excel.worksheet.functions
Domenic
external usenet poster
 
Posts: 147
Default OR or ARRAY help

Try...

=SUM(IF($F$8:$F$57="W/M",IF(ISNUMBER(MATCH($D$8:$D$57,{"XYZ","ABC","LMN" ,
"QRS"},0)),1)))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
Bigfoot17 wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.

  #8  
Old February 19th, 2007, 06:17 PM posted to microsoft.public.excel.worksheet.functions
Bigfoot17
external usenet poster
 
Posts: 41
Default OR or ARRAY help

This was extremely helpful, and it appears I was so confused I was making it
harder than it needed to be. However, I'd like to push the envelope a bit
further ...

I need to evaluate several ranges for the "W/M" and corresponding "XYZ" etc.
Would this be a matter of adding several SUMPRODUCTS together?
=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))+SUMPRO DUCT(($N$8:$N$57="W/M")*($L$8:$L$57={"XYZ","ABC","LMN","QRS"}))

Thanks for the help you have already been.


"Toppers" wrote:

TRY:

=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))

HTH

"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC", "LMN",
"QRS"))),1,0))}

Any guidance is appreciated.

  #9  
Old February 19th, 2007, 06:38 PM posted to microsoft.public.excel.worksheet.functions
Roger Govier
external usenet poster
 
Posts: 2,602
Default OR or ARRAY help

Hi

Yes, that would be the way to do it.

--
Regards

Roger Govier


"Bigfoot17" wrote in message
news
This was extremely helpful, and it appears I was so confused I was
making it
harder than it needed to be. However, I'd like to push the envelope a
bit
further ...

I need to evaluate several ranges for the "W/M" and corresponding
"XYZ" etc.
Would this be a matter of adding several SUMPRODUCTS together?
=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))+SUMPRO DUCT(($N$8:$N$57="W/M")*($L$8:$L$57={"XYZ","ABC","LMN","QRS"}))

Thanks for the help you have already been.


"Toppers" wrote:

TRY:

=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))

HTH

"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that
are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC",
"LMN",
"QRS"))),1,0))}

Any guidance is appreciated.



  #10  
Old February 19th, 2007, 06:45 PM posted to microsoft.public.excel.worksheet.functions
Bigfoot17
external usenet poster
 
Posts: 41
Default OR or ARRAY help

I get a "Formula Too Long" error since their are two many ranges. Any other
suggestions to make this work?

"Roger Govier" wrote:

Hi

Yes, that would be the way to do it.

--
Regards

Roger Govier


"Bigfoot17" wrote in message
news
This was extremely helpful, and it appears I was so confused I was
making it
harder than it needed to be. However, I'd like to push the envelope a
bit
further ...

I need to evaluate several ranges for the "W/M" and corresponding
"XYZ" etc.
Would this be a matter of adding several SUMPRODUCTS together?
=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))+SUMPRO DUCT(($N$8:$N$57="W/M")*($L$8:$L$57={"XYZ","ABC","LMN","QRS"}))

Thanks for the help you have already been.


"Toppers" wrote:

TRY:

=SUMPRODUCT(($F$8:$F$57="W/M")*($D$8:$D$57={"XYZ","ABC","LMN","QRS"}))

HTH

"Bigfoot17" wrote:

I am struggling!

This statement will count the number of "W/M"s that are "XYZ":
{=SUM(IF(($F$8:$F$57="W/M")*($D$8:$D$57="XYZ"),1,0))}

But what I would really like to know is the number of "W/M"s that
are "XYZ",
"ABC", "LMN", etc. I thought this would work, but it doesn't:
{=SUM(IF(ISNA(($F$8:$F$57="W/M")*($D$8:$D$57=OR("XYZ", "ABC",
"LMN",
"QRS"))),1,0))}

Any guidance is appreciated.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.