Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
shmurphing
 
Posts: n/a
Default SUMPRODUCT formula

So I have a sheet that gaves external data from OBDC. I am using a lot of
SUMPRODUCT formulas.

Everytime I update the query all the formulas ranges seem to change.
IE:
I have set a formula of:
=SUMPRODUCT(--('Wpg #s data'!C6:C500="Incident"),--('Wpg #s data'!F6:F500C2))

And it changes to:
=SUMPRODUCT(--('Wpg #s data'!C6:C415="Incident"),--('Wpg #s data'!F6:F415C2))

Why is that happening? I will usually have a range of around 300 but I am
concerned that if it changes it on the fly that there could be issues with
the collection of data and therefore the report could be wrong. Any thoughts?
  #2   Report Post  
JBoulton
 
Posts: n/a
Default

I have that exact situation and solved it using dynamic range names. That
would change your formula to
=SUMPRODUCT(--(rangename1="Incident"),--(rangename2C2)). As I said, that
solved the problem for me.

HTH

"shmurphing" wrote:

So I have a sheet that gaves external data from OBDC. I am using a lot of
SUMPRODUCT formulas.

Everytime I update the query all the formulas ranges seem to change.
IE:
I have set a formula of:
=SUMPRODUCT(--('Wpg #s data'!C6:C500="Incident"),--('Wpg #s data'!F6:F500C2))

And it changes to:
=SUMPRODUCT(--('Wpg #s data'!C6:C415="Incident"),--('Wpg #s data'!F6:F415C2))

Why is that happening? I will usually have a range of around 300 but I am
concerned that if it changes it on the fly that there could be issues with
the collection of data and therefore the report could be wrong. Any thoughts?

  #3   Report Post  
shmurphing
 
Posts: n/a
Default

OK. Just a little confused. So how does the formula know that rangname1=
column C? Or does it look at the entire sheet for the word incident? What
if that word appears in other columns -- either by itself or within a phrase?



"JBoulton" wrote:

I have that exact situation and solved it using dynamic range names. That
would change your formula to
=SUMPRODUCT(--(rangename1="Incident"),--(rangename2C2)). As I said, that
solved the problem for me.

HTH

"shmurphing" wrote:

So I have a sheet that gaves external data from OBDC. I am using a lot of
SUMPRODUCT formulas.

Everytime I update the query all the formulas ranges seem to change.
IE:
I have set a formula of:
=SUMPRODUCT(--('Wpg #s data'!C6:C500="Incident"),--('Wpg #s data'!F6:F500C2))

And it changes to:
=SUMPRODUCT(--('Wpg #s data'!C6:C415="Incident"),--('Wpg #s data'!F6:F415C2))

Why is that happening? I will usually have a range of around 300 but I am
concerned that if it changes it on the fly that there could be issues with
the collection of data and therefore the report could be wrong. Any thoughts?

  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

http://www.contextures.com/xlNames01.html#Dynamic

Regards,

Peo Sjoblom

"shmurphing" wrote:

OK. Just a little confused. So how does the formula know that rangname1=
column C? Or does it look at the entire sheet for the word incident? What
if that word appears in other columns -- either by itself or within a phrase?



"JBoulton" wrote:

I have that exact situation and solved it using dynamic range names. That
would change your formula to
=SUMPRODUCT(--(rangename1="Incident"),--(rangename2C2)). As I said, that
solved the problem for me.

HTH

"shmurphing" wrote:

So I have a sheet that gaves external data from OBDC. I am using a lot of
SUMPRODUCT formulas.

Everytime I update the query all the formulas ranges seem to change.
IE:
I have set a formula of:
=SUMPRODUCT(--('Wpg #s data'!C6:C500="Incident"),--('Wpg #s data'!F6:F500C2))

And it changes to:
=SUMPRODUCT(--('Wpg #s data'!C6:C415="Incident"),--('Wpg #s data'!F6:F415C2))

Why is that happening? I will usually have a range of around 300 but I am
concerned that if it changes it on the fly that there could be issues with
the collection of data and therefore the report could be wrong. Any thoughts?

  #5   Report Post  
tjtjjtjt
 
Posts: n/a
Default

If you are unfamiliar with dynamic named ranges:
http://www.cpearson.com/excel/named.htm
Scroll down a bit to find the section about Dynamic Named Ranges.

tj

"JBoulton" wrote:

I have that exact situation and solved it using dynamic range names. That
would change your formula to
=SUMPRODUCT(--(rangename1="Incident"),--(rangename2C2)). As I said, that
solved the problem for me.

HTH

"shmurphing" wrote:

So I have a sheet that gaves external data from OBDC. I am using a lot of
SUMPRODUCT formulas.

Everytime I update the query all the formulas ranges seem to change.
IE:
I have set a formula of:
=SUMPRODUCT(--('Wpg #s data'!C6:C500="Incident"),--('Wpg #s data'!F6:F500C2))

And it changes to:
=SUMPRODUCT(--('Wpg #s data'!C6:C415="Incident"),--('Wpg #s data'!F6:F415C2))

Why is that happening? I will usually have a range of around 300 but I am
concerned that if it changes it on the fly that there could be issues with
the collection of data and therefore the report could be wrong. Any thoughts?



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 formula to slow Todd Excel Worksheet Functions 4 December 21st 04 11:25 PM
SUMPRODUCT formula shmurphing Excel Worksheet Functions 2 December 21st 04 04:49 PM
sumproduct formula Brian Excel Worksheet Functions 1 December 12th 04 05:21 AM
Shorten sumproduct formula Andre Croteau Excel Discussion (Misc queries) 1 December 11th 04 10:30 PM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"