View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Sinner Sinner is offline
external usenet poster
 
Posts: 142
Default A macro solution - replace text given the values

On Sep 9, 4:09*pm, Mike H wrote:
Hi,

Right click sheet 1 tab, view code and paste this in and run it

Sub standard()
For Each c In ActiveSheet.UsedRange
* * On Error Resume Next
* * If Not IsEmpty(c) Then
c.Value = WorksheetFunction.VLookup(c.Value, Sheets("Temp").Range("A1:B4"),
2, False)
* * End If
Next
End Sub

Mike



"Sinner" wrote:
Hi,


I would like to have a macro to replace text in a sheet based on
values in another sheet.


Sample file is at:
http://www.savefile.com/files/1777260


Thx.- Hide quoted text -


- Show quoted text -


Thx bob & mike : )

Mike can u go through your code once again. It seems something is
missing.

Thx.