Perhaps
rng = "B" & ofst + 4
rng2 = "B" & (ofst + 5) & ":HZ" & (ofst + 5)
Range(rng).Formula = "=SumIf(B4:HZ4, "" * QUAD * ""," & rng2 & ")"
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Neil Atkinson" wrote in message
...
Can anyone modify this to work please I think it does not because of the
"" problem? Did try and do this at first using worksheet function but
have up now just trying to paste the formula into the worksheet!!!
rng = "B" & ofst + 4
rng2 = "B" & (ofst + 5) & ":HZ" & (ofst + 5)
Range(rng).Formula = "=SumIf(B4:HZ4, " * QUAD * ",rng2)"
Many Thanks
Neil
*** Sent via Developersdex http://www.developersdex.com ***