I have two excel spreadsheets. The first one is Field ID and has all Field ID's associated with field names Field ID Field Name 1000 Field 1 1001 Field 2 1002 Field 3 1003 Field 4 1004 Field 5 The other spreadsheet is the Rules spreadsheet IF ‘Field 1’ <> BLANK THEN ‘Field 2’ = 0 IF ‘Field 3’ = 0 AND ‘Field 4’ = 1 THEN ‘Field 5’ = 9 Problem: I want to write a macro that: 1. Can read rules from column Basic Rule in the Rules worksheet. The rules have field names in single quotes as would appear in when typed in microsoft word. They are not plain quote like '. 2. Go to the field worksheet and look for text e.g. Field 1 and get corresponding field id 1000 3. Come back on the Rules sheet and replace the field name with field id. Here is how the output should look like Rule IF ^1000 <> BLANK THEN ^1001 = 0 IF ^1002 = 0 AND ^1003 = 1 THEN ^1004 = 9 I have tried writing a find and replace macro but that does not work. I guess what I am looking for is some kind of pattern matching. Since I am a new to excel VBA I am having trouble with it. Any help will be much appreciated.