View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Using Code names in formulas

Thanks Dave, that's what I needed.

"Dave Peterson" wrote:

One way:

Cells(i, "E").FormulaR1C1 = _
"=SUMPRODUCT(--('" & TEST.name & "'!R13C4:R20C4='" & _
detail.name & "'!RC2),('" & _
test.name & "'!R13C18:R20C18))"



Barb Reinhardt wrote:

I've asked this elsewhere, but thought I'd put it up for more to see.

I have the following formula in my code:

Cells(i, "E").FormulaR1C1 = _
"=SUMPRODUCT(--('TESTING WORKSHEET'!R13C4:R20C4='Detail
Worksheet'!RC2),('TESTING WORKSHEET'!R13C18:R20C18))"

The code name for "TESTING WORKSHEET" is "TEST" and the code name for
"Detail Worksheet" is "DETAIL". I want to use the codename in the formula.
How do I do this?

Thanks,


--

Dave Peterson