View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey[_2_] JE McGimpsey[_2_] is offline
external usenet poster
 
Posts: 40
Default More help with Sumproduct VBA

Sometimes a constant can help with the nightma

Const csQQ As String = """"
Dim sRng1Addr As String
Dim sRng2Addr As String
With Sheets("IndivStats")
sRng1Addr = .Name & "!" & .Range( _
TeamColLtr & "5").Resize(BotRow - 4).Address(False, False)
sRng2Addr = .Name & "!" & .Range( _
WeekColLtr & "5").Resize(BotRow - 4).Address(False, False)
End With
CurrIndivScore = Evaluate("SumProduct((" & sRng1Addr & "=" & _
csQQ & CurrTeam & csQQ & ")*(" & sRng2Addr & "))")





In article ,
"John Wilson" wrote:

Rob,

Never knew about the vbNewLine. Thanks.

My final code (for the record and so that I might find it Google
when I'm having senoir moments (sometimes days)) is as follows:

CurrIndivScore = Evaluate("SUMPRODUCT((IndivStats!" & _
TeamColLtr & "5:" & TeamColLtr & BotRow & _
"=""" & CurrTeam & """)*(IndivStats!" & _
WeekColLtr & "5:" & WeekColLtr & BotRow & "))")

Those quote marks can be a &%$*@# nightmare.