View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 145
Default Is there a more elegant way to macro this?

Maybe not more elegant, but it would be more robust if you qualify all
appropriate Range's with a sheet reference.

Tim

"Brad" wrote in message
...
Sub changekey()
If Range("b1").Value = "Joint" Then
Range("key1").Value = "J" & Mid(Range("key1").Value, 2, 255)
End If
End Sub