Originally Posted by
BAC240SX
Below is the code I used:
Sub Cleanliness_Negative_Weighting()
On Error Resume Next
' The following converts 1's to 5s; 2's to 4s; 3's to 3s; 4's to 2s; and 5's to 1s in the specified columns
With [l:l,p:p,r:r,s:s,w:w,y:y]
.Replace what:="1", replacement:=5, lookat:=xlWhole
.Replace what:="2", replacement:=4, lookat:=xlWhole
.Replace what:="4", replacement:=2, lookat:=xlWhole
.Replace what:="5", replacement:=1, lookat:=xlWhole
End With
End Sub
Essentially I have data that needs to be negatively weighted ie 1s changed to 5s and 2s changed to 4s ect....
The problem I have is the second two ".Replace..."s negate the first two. How do I get the macro to ignore cells its already changed? Any help would be grealty appreciated
Bookmarks