Putting in formula to process cell above

C

Chuck Roberts

I have Excel 2000 on Win 2000.

I would like to make a macro to put in a formula in the current cell to
multiply the cell above by 1.1, move right 1 cell, then insert a formula to
multiply the cell above by 1.1. Help file wasn't helpful. How would I do this?
Cell referencing should be relative as I will be doing this on many rows.

Thanks.
 
C

Cesar Zapata

Hi,

one way will be

Function ColLetter(Rng As Range) As String
ColLetter = Left(Rng.Address(False, False), _
1 - (Rng.Column > 26))
End Function


Sub InsertFormu()
'MsgBox ColLetter(ActiveCell)
ActiveCell.Formula = "=" & ColLetter(ActiveCell) & ActiveCell.Row - 1 &
"*1.1"
End Sub


watch for text wrap.


Cesar Zapata
 
Top