View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Searching for text within formula

hi Ronald,

Sub Macro1()
x = Sheets("Sheet1").Range("First_Cell").Formula
y = Application.Substitute(x, "PRODUCT", "SUM")
Sheets("Sheet1").Range("First_Cell").Formula = y
End Sub

Sub Macro2()
x = Sheets("Sheet1").Range("First_Cell").Formula
y = Application.Substitute(x, "SUM", "PRODUCT")
Sheets("Sheet1").Range("First_Cell").Formula = y
End Sub

--
isabelle