white_flag
Active Member
- Joined
- Mar 17, 2010
- Messages
- 331
Hello I have the following code:
This will add (1+$L$294/100) to an range of cells
but I like to be like this "= cell*(1+$L$294/100)"
and like this is: "cell*(1+$L$294/100)" without equal signIf I put the code like this I received error :
Code:
Option Explicit
Public Sub test()
Dim my_range As Range
Dim c As Variant
Set my_range = ActiveSheet.Range("D295:I314")
For Each c In my_range
Cells(c.Row, c.Column).Value = Cells(c.Row, c.Column).Value & "*(1+$L$294/100)"
Next c
End Sub
This will add (1+$L$294/100) to an range of cells
but I like to be like this "= cell*(1+$L$294/100)"
and like this is: "cell*(1+$L$294/100)" without equal signIf I put the code like this I received error :
Code:
Cells(c.Row, c.Column).Value = "=" & Cells(c.Row, c.Column).Value & "*(1+$L$294/100)"