Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default SUMPRODUCT QUERY

Hi

I have a spreadsheet where a formulae
'=SUMPRODUCT((A$2:A$11="S")*(A$2:A$11<A$3:A$12)) ' was initially set to
count separate instances of "S"in a Column A

S

SD

SD
SN

S



This works fine but I need to extend the formula so it counts the number of
instances of S, SD or SN.

In the above example there are four seperate instances but the formula I
have created '
=SUMPRODUCT((A$2:A$11="S")*(A$2:A$11<A$3:A$12))+S UMPRODUCT((A$2:A$11="SD")*
(A$2:A$11<A$3:A$12))+SUMPRODUCT((A$2:A$11="SN")*( A$2:A$11<A$3:A$12))
'counts five because although the SD and SN follow each other it counts them
as seperate.
I need it to count the SD & SN together as one instance.

Hope I have explained OK - any suggestions welcome.

Regards

Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default SUMPRODUCT QUERY

Paul,

Want to give this a whirl

=SUMPRODUCT((LEFT(A$2:A$11,1)="S")*(LEFT(A$2:A$11, 1)<(LEFT(A$3:A$12,1))))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Paul Bird" wrote in message
...
Hi

I have a spreadsheet where a formulae
'=SUMPRODUCT((A$2:A$11="S")*(A$2:A$11<A$3:A$12)) ' was initially set to
count separate instances of "S"in a Column A

S

SD

SD
SN

S



This works fine but I need to extend the formula so it counts the number

of
instances of S, SD or SN.

In the above example there are four seperate instances but the formula I
have created '

=SUMPRODUCT((A$2:A$11="S")*(A$2:A$11<A$3:A$12))+S UMPRODUCT((A$2:A$11="SD")*
(A$2:A$11<A$3:A$12))+SUMPRODUCT((A$2:A$11="SN")*( A$2:A$11<A$3:A$12))
'counts five because although the SD and SN follow each other it counts

them
as seperate.
I need it to count the SD & SN together as one instance.

Hope I have explained OK - any suggestions welcome.

Regards

Paul




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default SUMPRODUCT QUERY

Thanks Bob - did the trick straight away - very useful.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Sumproduct query Marc T Excel Worksheet Functions 4 June 1st 09 04:46 PM
SUMPRODUCT QUERY jebreeg Excel Worksheet Functions 1 December 22nd 08 12:06 AM
Sumproduct query Scrunch Excel Worksheet Functions 9 October 13th 08 11:51 PM
SUMPRODUCT IF query sdg8481 Excel Discussion (Misc queries) 1 March 6th 07 05:25 PM
Sumproduct Query shakey1181 Excel Discussion (Misc queries) 6 June 7th 06 11:56 AM


All times are GMT +1. The time now is 03:12 PM.

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"