Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count number of rows < Sumproduct

I hope someone can help me with following issue:

I am using a sumproduct formula --- =SUMPRODUCT(($A$2:$A$12569="101")*($B$2:
$B$12569="6")*($E$2:$E$12569={4;5;6})*$C$2:$C$1256 9)

As you can see It starts with row number 2 and in this case ends at 12569. My
problem is that the area E2:E12569 comes from a query from another program.
Next time I run this query it may end up with another row number (ex. 11876
or 33215) Can i make my sumproduct formula count the number of rows and
automatically insert this number in the formula???

Thank you in advance.....

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count number of rows < Sumproduct


You can use dynamic ranges which are described on 'this site'
(http://www.contextures.com/xlNames01.html#Dynamic)


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=47945

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Count number of rows < Sumproduct

Try this:
=SUMPRODUCT((INDIRECT("$A$2:$A$"&COUNT(C:C)+1)="10 1")*(INDIRECT("$B$2:$B$"&COUNT(C:C)+1)="6")*(INDIR ECT("$E$2:$E$"&COUNT(C:C)+1)={4,5,6})*INDIRECT("$C $2:$C$"&COUNT(C:C)+1))

Regards,
Stefi

€˛micro1000€¯ ezt Ć*rta:

I hope someone can help me with following issue:

I am using a sumproduct formula --- =SUMPRODUCT(($A$2:$A$12569="101")*($B$2:
$B$12569="6")*($E$2:$E$12569={4;5;6})*$C$2:$C$1256 9)

As you can see It starts with row number 2 and in this case ends at 12569. My
problem is that the area E2:E12569 comes from a query from another program.
Next time I run this query it may end up with another row number (ex. 11876
or 33215) Can i make my sumproduct formula count the number of rows and
automatically insert this number in the formula???

Thank you in advance.....


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count number of rows < Sumproduct

You could simply use the smallest max expected extent, say row 50000:
=SUMPRODUCT((A2:A50000="101")*(B2:B50000="6")*(E2: E50000={4;5;6})*C2:C50000)

Another way, assuming col E will determine the last row of data, and that
data in E2 down will be contiguous nums right down (ie no blank cells
in-between), then this:
=SUMPRODUCT((A2:INDEX(A2:A50000,COUNT(E2:E50000))= "101")*(B2:INDEX(B2:B50000,COUNT(E2:E50000))=" 6")
*(E2:INDEX(E2:E50000,COUNT(E2:E50000))={4;5;6})*C2 :INDEX(C2:C50000,COUNT(E2:E50000)))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
---
"micro1000" <u48676@uwe wrote in message news:8fdda63bd2cb0@uwe...
I hope someone can help me with following issue:

I am using a sumproduct formula ---
=SUMPRODUCT(($A$2:$A$12569="101")*($B$2:
$B$12569="6")*($E$2:$E$12569={4;5;6})*$C$2:$C$1256 9)

As you can see It starts with row number 2 and in this case ends at 12569.
My
problem is that the area E2:E12569 comes from a query from another
program.
Next time I run this query it may end up with another row number (ex.
11876
or 33215) Can i make my sumproduct formula count the number of rows and
automatically insert this number in the formula???

Thank you in advance.....



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Count number of rows < Sumproduct

=SUMPRODUCT(($A$2:INDEX($A:$A,COUNTA($A:$A))="101" )*($B$2:INDEX($B:$B,COUNTA($A:$A))="6")
*($E$2:INDEX($E:$E,COUNTA($A:$A))={4,5,6})*$C$2:IN DEX($C:$C,COUNTA($A:$A)))

--
__________________________________
HTH

Bob

"micro1000" <u48676@uwe wrote in message news:8fdda63bd2cb0@uwe...
I hope someone can help me with following issue:

I am using a sumproduct formula ---
=SUMPRODUCT(($A$2:$A$12569="101")*($B$2:
$B$12569="6")*($E$2:$E$12569={4;5;6})*$C$2:$C$1256 9)

As you can see It starts with row number 2 and in this case ends at 12569.
My
problem is that the area E2:E12569 comes from a query from another
program.
Next time I run this query it may end up with another row number (ex.
11876
or 33215) Can i make my sumproduct formula count the number of rows and
automatically insert this number in the formula???

Thank you in advance.....





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count number of rows < Sumproduct

HI Max, I succeeded using your formula with index. I only had to change a ,
to ;

But you have just made my day.

Thank you very much.... :0)

Max wrote:
You could simply use the smallest max expected extent, say row 50000:
=SUMPRODUCT((A2:A50000="101")*(B2:B50000="6")*(E2 :E50000={4;5;6})*C2:C50000)

Another way, assuming col E will determine the last row of data, and that
data in E2 down will be contiguous nums right down (ie no blank cells
in-between), then this:
=SUMPRODUCT((A2:INDEX(A2:A50000,COUNT(E2:E50000)) ="101")*(B2:INDEX(B2:B50000,COUNT(E2:E50000))=" 6")
*(E2:INDEX(E2:E50000,COUNT(E2:E50000))={4;5;6})*C 2:INDEX(C2:C50000,COUNT(E2:E50000)))
I hope someone can help me with following issue:

[quoted text clipped - 12 lines]

Thank you in advance.....


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count number of rows < Sumproduct

Welcome, glad you got it up there
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
---
"micro1000" <u48676@uwe wrote in message news:8fde9d1479e74@uwe...
HI Max, I succeeded using your formula with index. I only had to change a
,
to ;

But you have just made my day.

Thank you very much.... :0)



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Count number of rows < Sumproduct

Hi Max,

do you have any idea how to make the index not count blank cells as 0????

Max wrote:
Welcome, glad you got it up there
HI Max, I succeeded using your formula with index. I only had to change a
,

[quoted text clipped - 3 lines]

Thank you very much.... :


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

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count number of rows < Sumproduct

Pl put in a fresh new posting, with more detail / examples.
You'd get better exposure for your query to ALL responders
(This thread is long closed)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"micro1000 via OfficeKB.com" <u48676@uwe wrote in message
news:9068f06c18bb5@uwe...
Hi Max,

do you have any idea how to make the index not count blank cells as 0????



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 automatically count number of rows [email protected] Excel Worksheet Functions 4 November 12th 08 11:49 AM
Count how many Rows ago a particular number was hit rhhince Excel Worksheet Functions 1 January 13th 07 09:06 PM
Count number of rows, where non relevant rows are hidden Pieter Excel Discussion (Misc queries) 2 November 8th 06 12:24 PM
Count rows and insert number to count them. Mex Excel Discussion (Misc queries) 6 August 23rd 06 02:29 AM
Using sumproduct to count number by date JerryS Excel Worksheet Functions 2 June 6th 05 10:37 PM


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