Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Using offset in sumproduct, is it possible?

I have a dynamic range named code_db. It is a single column which expands as
new codes are added. I want to sum a column which is offest 22 columns. For
Excel 2007 the following formula works fine:
=(SUMIFS(OFFSET(Code_db,0,22),Code_db,$U$3&M7,OFFS ET(Code_db,0,9),"Water"))

I'm trying to make it compatible with Excel 2003 using sumproduct and
offsets, but keep getting "#Value" when I enter the formula:
=SUMPRODUCT(--(OFFSET(Code_db,0,22)),--(Code_db=$U$3&M7),--(OFFSET(Code_db,0,9)="Water"))

Is it possible to use sumproducts and offsets?

Thanks for your help!

Mike

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Using offset in sumproduct, is it possible?

Hi,

I can't see what's in each of your ranges but the formula does not return an
error on my machine. One question the range Code_db - what does that
represent?

In 2003 you can't refer to an entire column in a sumproduct formula, but you
can in 2007. So if Code_db represents something like A:A it won't work.

If this helps, please click the Yes button.

Shane Devenshire

"mike in texas" wrote:

I have a dynamic range named code_db. It is a single column which expands as
new codes are added. I want to sum a column which is offest 22 columns. For
Excel 2007 the following formula works fine:
=(SUMIFS(OFFSET(Code_db,0,22),Code_db,$U$3&M7,OFFS ET(Code_db,0,9),"Water"))

I'm trying to make it compatible with Excel 2003 using sumproduct and
offsets, but keep getting "#Value" when I enter the formula:
=SUMPRODUCT(--(OFFSET(Code_db,0,22)),--(Code_db=$U$3&M7),--(OFFSET(Code_db,0,9)="Water"))

Is it possible to use sumproducts and offsets?

Thanks for your help!

Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Using offset in sumproduct, is it possible?

Shane thanks for the quick response.

"code_db" is a range d5:d? depending on the number of entires in D.

I discovered that I needed to offset (1,22) rather than (0,22) to prevent
including the text at the top of the column. this formula works fine:

=SUMPRODUCT(--(OFFSET(Code_db,1,22)),--(OFFSET(Code_db,1,0)=$U$3&M7),--(OFFSET(Code_db,1,9)="Water"))

Apparently sumproduct doesn't like to sum up text.

Thanks

Mike


"Shane Devenshire" wrote:

Hi,

I can't see what's in each of your ranges but the formula does not return an
error on my machine. One question the range Code_db - what does that
represent?

In 2003 you can't refer to an entire column in a sumproduct formula, but you
can in 2007. So if Code_db represents something like A:A it won't work.

If this helps, please click the Yes button.

Shane Devenshire

"mike in texas" wrote:

I have a dynamic range named code_db. It is a single column which expands as
new codes are added. I want to sum a column which is offest 22 columns. For
Excel 2007 the following formula works fine:
=(SUMIFS(OFFSET(Code_db,0,22),Code_db,$U$3&M7,OFFS ET(Code_db,0,9),"Water"))

I'm trying to make it compatible with Excel 2003 using sumproduct and
offsets, but keep getting "#Value" when I enter the formula:
=SUMPRODUCT(--(OFFSET(Code_db,0,22)),--(Code_db=$U$3&M7),--(OFFSET(Code_db,0,9)="Water"))

Is it possible to use sumproducts and offsets?

Thanks for your help!

Mike

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
#REF Error in Named Range with INDIRECT, SUMPRODUCT, and OFFSET Greg in CO[_2_] Excel Worksheet Functions 6 October 13th 08 06:45 PM
Sumproduct Offset with an If Steve[_4_] Excel Worksheet Functions 2 March 28th 08 08:43 PM
Sumproduct and offset Maarten Excel Worksheet Functions 4 October 28th 05 10:23 AM
Sumproduct with offset? MJ Excel Worksheet Functions 3 March 15th 05 03:34 PM
SUMPRODUCT using offset from ROW if X marks the spot The Shaffer s Excel Worksheet Functions 3 November 2nd 04 06:14 AM


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