LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default sumproduct in code

What I am trying to accomplish is this:
I am trying to use a for loop to create a table that generates a column
(aa). Based on the cells in AA, I want sumproduct (in column ab) to perform
add up the sums in another table (cause.column(3)) where the value in
causecats (which is the first column in the cause table) is equalt to the
value in AAr+1.

The values in AAr+1 are populated from a review of the values in causecats.

The code I am trying is this.
Cells(r + 1, "ab").Formula = "=sumproduct((" & causecats.Address & "=" & _
Cells(r + 1, "aa").Address & ")*(" & cause.Columns(3).Address & "))"

From my experimentation, I can not get the sumproduct to work unless I put
the value I am looking for within the first array in quotes. In other words,
I can not say
"=sumproduct((array1=a3)*(array2)"
This appears to only work if I put an actual value in place of a3 and place
it in quotes.
I think that is my problem above. Is there a way around it?

TIA
 
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
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
Enhance sumproduct to return unique employee code count Max Excel Worksheet Functions 5 December 4th 07 05:54 PM


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

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"