Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm having a run time error with this code:
NewSht.Range("K72") = OldSht.Range("K69" - "K70" - "K71") Suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
NewSht.Range("K72") = OldSht.Range("K69") - OldSht.Range("K70") - OldSht.Range("K71") OR NewSht.Range("K72") = OldSht.Range("K69") - (OldSht.Range("K70") + OldSht.Range("K71")) If this post helps click Yes --------------- Jacob Skaria "Jim" wrote: I'm having a run time error with this code: NewSht.Range("K72") = OldSht.Range("K69" - "K70" - "K71") Suggestions? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is another way do it...
With OldSht.Range("K69") NewSht.Range("K72").Value = .Value - .Offset(1).Value - .Offset(2).Value End With -- Rick (MVP - Excel) "Jim" wrote in message ... I'm having a run time error with this code: NewSht.Range("K72") = OldSht.Range("K69" - "K70" - "K71") Suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |