View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Displaying values rather than formula in cells


With Target.Offset(0, 1)
.FormulaR1C1 =
"=SUMPRODUCT(--(WE_Date_Raw=DATE(YEAR(RC[-1]),MONTH(RC[-1]),DAY(RC[-1]))),(D
efects_Raw))"
.Value = .Value
End With
With Target.Offset(0, 2)
.FormulaR1C1 =
"=SUMPRODUCT(--(WE_Date_Raw=DATE(YEAR(RC1),MONTH(RC1),DAY(RC1))), (Opportunit
ies_Raw))"
.Value = .Value
End With



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Barb Reinhardt" wrote in message
...
I have the following in a worksheet change event:

Target.Offset(0, 1).FormulaR1C1 =

"=SUMPRODUCT(--(WE_Date_Raw=DATE(YEAR(RC[-1]),MONTH(RC[-1]),DAY(RC[-1]))),(D
efects_Raw))"
Target.Offset(0, 2).FormulaR1C1 =

"=SUMPRODUCT(--(WE_Date_Raw=DATE(YEAR(RC1),MONTH(RC1),DAY(RC1))), (Opportunit
ies_Raw))"


I want it to display the results in the cells instead of the formulas.

What
do I need to change to get this to do what I want?

Thanks in advance