G
Guest
I need to write a macro to do some math. Cell A has a date lets say 5/15/80,
Cell G has a date lets say 5/15/06, Cell F has the eqation G-6574. If Cell A
i = 0
Range("C:c").Select
Do
activecell.FormulaR1C1 = "=RC[-1]-6574"
i = i + 1
Loop Until IsEmpty(activecell.Offset(i, -1))
Columns("C:C").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
For some reason this wont loop through all the cells, it work on the first
cell then finishes leaving the next couple cells empty even though they
should also have data in them!! Any Help would be greatly appreciated, Neal.
Cell G has a date lets say 5/15/06, Cell F has the eqation G-6574. If Cell A
Dim i As Integer= cell G then Place an X in cell I. This is what i have so far:
i = 0
Range("C:c").Select
Do
activecell.FormulaR1C1 = "=RC[-1]-6574"
i = i + 1
Loop Until IsEmpty(activecell.Offset(i, -1))
Columns("C:C").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
For some reason this wont loop through all the cells, it work on the first
cell then finishes leaving the next couple cells empty even though they
should also have data in them!! Any Help would be greatly appreciated, Neal.