Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Excel VBA + SumProduct + not working!

Hi
try:
TTTT = Application.Evaluate("=SumProduct( _
'varInput'!C2:C3940 = ""N"") * ('varInput'!B2:B" & TR & ") < 38352) _
* ('8 6 04output2'!G2:G3940))")

But you know this will work only if TR = 3940


--
Regards
Frank Kabel
Frankfurt, Germany


Gents-
I am performing a basic SumProduct, but am having problems when not
just directly pasting the formula in the cell. I've looked at some
past posts, and that's where I got the "Application.Evaluate" hint,
but can't make it work.

I am trying to use the following code:

TTTT = Application.Evaluate("SumProduct( _
(Sheets(varInput).Range(C2:C3940) = ""N"") _
* (Sheets(varInput).Range("B" & 2 & ":B" & TR) < 38352) _
* (Sheets("8 6 04output2").Range("G2:G3940"))")

I have tried different variations of parenthesis and quotation marks,
but can't get it to work. I am admittedly new at this.

The following works for me, but I think it would be more efficient if
I had excel do the calculation and just insert the result in the

cell.

Sheets(AMname).Cells(5, 6) = "=SUMPRODUCT(('" & varInput &

"'!R2C1:R["
& TR & "]C1=" & AMLname & ")*('" & varInput & "'!R2C3:R[" & TR &
"]C3=""N"")*('" & varInput & "'!R2C2:R[" & TR & "]C2<=38352)*('" &
varInput & "'!R2C2:R[" & TR & "]C238256)*('" & varInput &

"'!R2C7:R["
& TR & "]C7))"


---
Message posted from http://www.ExcelForum.com/


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 not working Curtis Excel Worksheet Functions 3 November 4th 09 02:16 AM
SUMPRODUCT not working. Gaurav[_4_] Excel Worksheet Functions 2 June 25th 09 09:37 PM
SUMPRODUCT Not Working dj479794 Excel Discussion (Misc queries) 2 March 12th 07 12:54 PM
Sumproduct not working macamarr Excel Worksheet Functions 5 December 28th 06 02:36 PM
Sumproduct Not Working Carl Excel Worksheet Functions 5 August 15th 06 07:09 PM


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