Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default EVALUATE SUMPRODUCT formula

To TOPPERS and Bob Philips.

How can code 1 be amended to incorporate the EVALUATE option
(code 2) for the SUMPRODUCT function only. Thank you.

Code 1
Dim i As Long For i = 10201 To 10320 Step 8
Cells(i, "J").Resize(7).FormulaR1C1 = _
"=SUMPRODUCT(--(R6C6:R10006C6=RC9),--(R6C4:R10006C4=R10200C),R6C32:R10006C32)"
Cells(i + 7, "J").FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" 'TOTAL FOR GROUP
Next i
'================
Code 2 EVALUATE
Range("d1") =
Evaluate("SUMPRODUCT(--(ALVXXL01!$B$2:$B$65536=A5),--(ALVXXL01!$K$2:$K$65536=""MMV3""),--(ALVXXL01!$P$2:$P$655360),--(ALVXXL01!$P$2:$P$65536))")

--
Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default EVALUATE SUMPRODUCT formula

dblVal = Evaluate("SUMPRODUCT(--(R6C6:R10006C6=RC9)" & _
",--(R6C4:R10006C4=R10200C),R6C32:R10006C32)")

Since all your references are absolute, you would only need to do this once.

--
Regards,
Tom Ogilvy


"Robert" wrote in message
...
To TOPPERS and Bob Philips.

How can code 1 be amended to incorporate the EVALUATE option
(code 2) for the SUMPRODUCT function only. Thank you.

Code 1
Dim i As Long For i = 10201 To 10320 Step 8
Cells(i, "J").Resize(7).FormulaR1C1 = _

"=SUMPRODUCT(--(R6C6:R10006C6=RC9),--(R6C4:R10006C4=R10200C),R6C32:R10006C32
)"
Cells(i + 7, "J").FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" 'TOTAL FOR GROUP
Next i
'================
Code 2 EVALUATE
Range("d1") =

Evaluate("SUMPRODUCT(--(ALVXXL01!$B$2:$B$65536=A5),--(ALVXXL01!$K$2:$K$65536
=""MMV3""),--(ALVXXL01!$P$2:$P$655360),--(ALVXXL01!$P$2:$P$65536))")

--
Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default EVALUATE SUMPRODUCT formula

Thank you Tom, could you assist me with exact code(believe me, I tried many
times but without success,I do not know any VBA).
--
Robert



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default EVALUATE SUMPRODUCT formula

I appended the code with recorded a macro code which copies the range and
PasteSpecialValues. Achieved what I desired.
--
Robert



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
Formula Will Not Evaluate Cecil Excel Worksheet Functions 3 April 25th 06 07:38 PM
Why won't Sumproduct funciton evaluate this data [email protected] Excel Worksheet Functions 1 March 8th 06 07:56 PM
Evaluate sumproduct question ram Excel Programming 12 December 23rd 05 11:04 PM
Evaluate formula using VBA Ali Baba Excel Discussion (Misc queries) 0 August 17th 05 12:31 AM
Evaluate - Sumproduct GRRR Paul M. Excel Programming 2 July 25th 03 04:17 AM


All times are GMT +1. The time now is 08:51 PM.

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"