View Single Post
  #9 (permalink)  
Old September 1st, 2017, 04:32 AM
wagon6urn3r wagon6urn3r is offline
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's been awhile since your post, and if you have not figured it out yet you might try something like this:


Sub ranCol()
Dim cell As Range
For Each cell In Range("A2:A52, B2:B52")
If cell.value = "Y" Then
cell.value = 2
ElseIf cell.value = "N" Then
cell.value = 1
ElseIf cell.value = "" Then
cell.value = 0
ElseIf cell.value = "y" Then
cell.value = 2
ElseIf cell.value = "n" Then
cell.value = 1
ElseIf cell.value = "" Then
cell.value = 0
End If
Next
End Sub
Reply With Quote