Yes, kinda like this, see the attached file.
Check out the formulas in column a before you press that there button. They're various nonsense formulas, some of which contain (A31,4). The code which the button runs will replace any instance of (A31,4) in column A from rows 1 to 10 with ($D$2,4), provided it's within a formula.
Code is as follows for anyone curious:
At the moment it checks 10 rows. Pretty easy to change that to check 32000.Option Explicit Private Sub CommandButton1_Click() Dim x As Integer For x = 1 To 10 Cells(x, 1).Formula = Application.WorksheetFunction.Substitute(Cells(x, 1).Formula, "(A31,4)", "($D$2,4)") Next x End Sub
Let's see if that's what you're after.
One thing at a time, lets get part 1 working and then move on to whatever else you needThen in Row 2, from Column C to Column CP I've got the 92 postcodes that I need to check them against.
mew!
Bookmarks