#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default sumproduct?

Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks




  #2   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default sumproduct?

Hi Teresa,

Try this:

=SUMPRODUCT((A2:A1000=3)*(B2:B1000=6)*C2:C1000)

Regards,
KL


"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default sumproduct?

Teresa,

Try the following. Adjust the ranges to suit your needs.

=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default sumproduct?

Instead of =SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


what would be the difference if you used:


=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*(C1:C100))


--
Thanks
Shawn


"Chip Pearson" wrote:

Teresa,

Try the following. Adjust the ranges to suit your needs.

=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks







  #5   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default sumproduct?

Hi Shawn,

The result will be the same, but the parenthesis around C1:C100 in the
second formula are simply redundant :-)

Regards,
KL


"Shawn" wrote in message
...
Instead of =SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


what would be the difference if you used:


=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*(C1:C100))


--
Thanks
Shawn


"Chip Pearson" wrote:

Teresa,

Try the following. Adjust the ranges to suit your needs.

=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default sumproduct?

Over the years I have gotten into the habbit of using the redundant
parenthasis. I am relieved to hear that there has not been some sort of
unknown error happeing because of this.

--
Thanks
Shawn


"KL" wrote:

Hi Shawn,

The result will be the same, but the parenthesis around C1:C100 in the
second formula are simply redundant :-)

Regards,
KL


"Shawn" wrote in message
...
Instead of =SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


what would be the difference if you used:


=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*(C1:C100))


--
Thanks
Shawn


"Chip Pearson" wrote:

Teresa,

Try the following. Adjust the ranges to suit your needs.

=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default sumproduct?

wouldn't a pivot table work in this instance?

--


Gary


"Chip Pearson" wrote in message
...
Teresa,

Try the following. Adjust the ranges to suit your needs.

=SUMPRODUCT((A1:A100=3)*(B1:B100=6)*C1:C100)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default sumproduct?

I am using something very similar to this in VBA code building a spreadsheet
from an Access application. The formula works well in excel but generates a
syntax error (on the : I think) in VBA. Any suggestions on overcoming this?

"KL" wrote:

Hi Teresa,

Try this:

=SUMPRODUCT((A2:A1000=3)*(B2:B1000=6)*C2:C1000)

Regards,
KL


"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks







  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default sumproduct?

Is that generating an SP formula in a cell, or trying to get a value using
SP? What is the code?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RAHokie" wrote in message
...
I am using something very similar to this in VBA code building a

spreadsheet
from an Access application. The formula works well in excel but

generates a
syntax error (on the : I think) in VBA. Any suggestions on overcoming

this?

"KL" wrote:

Hi Teresa,

Try this:

=SUMPRODUCT((A2:A1000=3)*(B2:B1000=6)*C2:C1000)

Regards,
KL


"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks









  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default sumproduct?

Sorry, it's a SUMIF function:

xlApp.Application.ActiveCell.Value = SUMIF(E9:E500,"MS",F9:F500)

"Bob Phillips" wrote:

Is that generating an SP formula in a cell, or trying to get a value using
SP? What is the code?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RAHokie" wrote in message
...
I am using something very similar to this in VBA code building a

spreadsheet
from an Access application. The formula works well in excel but

generates a
syntax error (on the : I think) in VBA. Any suggestions on overcoming

this?

"KL" wrote:

Hi Teresa,

Try this:

=SUMPRODUCT((A2:A1000=3)*(B2:B1000=6)*C2:C1000)

Regards,
KL


"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks












  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default sumproduct?

xlApp.Application.ActiveCell.Value =
ApplictionSUMIF(Range("E9:E500"),"MS",Range("F9:F5 00"))


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RAHokie" wrote in message
...
Sorry, it's a SUMIF function:

xlApp.Application.ActiveCell.Value = SUMIF(E9:E500,"MS",F9:F500)

"Bob Phillips" wrote:

Is that generating an SP formula in a cell, or trying to get a value

using
SP? What is the code?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RAHokie" wrote in message
...
I am using something very similar to this in VBA code building a

spreadsheet
from an Access application. The formula works well in excel but

generates a
syntax error (on the : I think) in VBA. Any suggestions on

overcoming
this?

"KL" wrote:

Hi Teresa,

Try this:

=SUMPRODUCT((A2:A1000=3)*(B2:B1000=6)*C2:C1000)

Regards,
KL


"teresa" wrote in message
...
Have 1000 rows of data

col A - I have Job Numbers 1 to 100
col B - I have tasks 1 to 10
col C - I have costs

If I want to know the total cots of task 6 for Job 3....?
I think you can do this via sumproduct?

Many Thanks












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 with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
Conditional SUMPRODUCT or SUMPRODUCT with Filters Ted M H Excel Worksheet Functions 4 August 14th 08 07:50 PM
SUMPRODUCT Alex H[_2_] Excel Worksheet Functions 6 September 7th 07 10:02 PM
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
=SUMPRODUCT ArthurN Excel Discussion (Misc queries) 5 April 9th 06 06:28 PM


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