PDA

View Full Version : help Excel code



KK1966
10-21-2008, 03:29 AM
Hi

Can someone help me to modify the formula as below as I wanna the value of sheets( ?Discnt?) return value = sum(a2:A70)?


home.Range("R2").Value = Wb.Worksheets("Discnt").Range= sum(a2:A70).Value ---- >> it not work



Please help

Bob Phillips
10-21-2008, 03:37 AM
With home.Range("R2")

.Formula = "=SUM('[" & Wb.Name & "]Discnt'!A2:$A70)"
.Value = .Value
End With

KK1966
10-21-2008, 03:46 AM
xld


wow..
Wonderfully, thanks your help .

Thanks