Thread: VBA Code Bug
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default VBA Code Bug

I will assume that you are trying to subtract ranges K70, K71 from K69?

see if this way helps:

newsht.Range("K72").Value = _
oldsht.Range("K69").Value - WorksheetFunction.Sum(oldsht.Range("K70:K71"))

--
jb


"Jim" wrote:

I'm having a run time error with this code:

NewSht.Range("K72") = OldSht.Range("K69" - "K70" - "K71")

Suggestions?