Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, folks. I've been away from macros for too long and can't get it
right for something this simple! I think i keep reverting to Fortran days! Kindly help. Here is my sorry-assed attempt at a macro that is supposed to copy from one cell and paste its value to another, until some third cell is close to zero. The purpose of this is to avoid having to use iterative mode, which I don't like becasue it masks other programming errors. Though I know there are always more creative ways to do these things, it might be best if you just correct what i've done in the most simple way, so that i can re-learn the basics. of ifs, thens, and loops. Thanks much Dean Option Explicit Sub fortyeightMIRBal() Dim j As Integer Dim myvalue As Variant For j = 1 To 1000 myvalue = Range("EndingIRBalance48").Value If Abs(myvalue) 0.001 Then Range("TotalInterest48").Select Selection.Copy Range("IntReserveBalance48").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Else: GoTo 100 End If Next j 100 End Sub |