hi
i found this code on net which does change the value of column G
but i add column H in to the original code and it change whole column H
to the value so how can i code to replace the value of column H with ref to the column G as my original code do
any help is greatly appreciated.
Sub ptester()
Dim Nv As Long
Nv = 40.99
Results = Array("40", Nv, "57.98", Nv, "57.94", Nv)
For p = 0 To UBound(Results, 1) Step 2
Columns("G:G").Replace What:=Results(p), Replacement:=Results(p + 1), LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
'p.Offset(0, 0) = Nv 'this changes Column G visible cells
Columns("H:H") = Round(Nv * 0.88, 2)
'p.Offset(0, 1) = Round(Nv * 0.88, 2) 'this changes Column H
'p.Offset(0, 2) = Round(Nv * 0.12, 2) 'this changes Column I
'p.Offset(0, 3) = Nv 'this changes Column J
'p.Offset(0, -1) = Nv 'this changes Column f
'.AutoFilterMode = False
Next
End Sub