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: 709
Default SUMPRODUCT statement only works sometimes

I'm writing a long program to analyze my lab's financial data.

I created a subprogram that I want to copy into the longer program. The
subprogram calculates an array of subtotals using the SUMPRODUCT command

total = ActiveSheet.Evaluate("SUMPRODUCT((" & myRng1.Address & _
"=""" & myVar1 & """)" & "*" & myRng2.Address & ")")

It works fine, but I need to port this into the long program.
I copy/pasted the subprogram into my main program, but it hangs up at this
command. I've used debug.print to confirm all the variables and ranges in the
SUMPRODUCT statement, and the active sheet is the same.

I'm stuck. What else could be causing this statement to hang up?
--
Richard
 
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 not works kashish Excel Worksheet Functions 1 May 1st 09 03:52 PM
Sumproduct not works kashish Excel Worksheet Functions 3 May 1st 09 01:57 PM
Countif works, Sumproduct doesn't Jennifer Excel Worksheet Functions 4 February 13th 07 06:07 AM
SUMPRODUCT Works Sometimes Why Mestrella31 Excel Discussion (Misc queries) 4 January 17th 05 07:13 PM
Statement works in one scenario, not in other Tod Excel Programming 1 April 20th 04 03:59 PM


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