View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default More help with Sumproduct VBA

J.E.

Soooooooo many different ways and I couldn't find one of them
on my own. :-(
I can't even remember how to spell "senior" correctly.

Thanks,
John

"JE McGimpsey" wrote in message
...
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.