Hi I am trying to do this:
1) Copy selected cells 10 rows below
2) Modify copied cells so that percentages become whole numbers and they are highlighted yellow.
Below is what I have so far. However this code is modifying the original cells, not the copied ones.
Before the line *For Each cell In r* I need to find a way to make it 'select' the copied cells so that these get modified instead.
Thanks very much for any help.
Sub Macro4()
Dim r As Range
Set r = Selection
r.Copy Destination:=r.Offset(10, 0)
For Each cell In r
With cell
If Application.WorksheetFunction.IsNumber(cell) Then
.Value = .Value * 100
.NumberFormat = "0"
.Interior.Color = RGB(255, 255, 0)
End If
End With
Next cell
End Sub
Bookmarks