Excel: Replacing Text in Cell Notes (78644)



The information in this article applies to:

  • Microsoft Excel for Windows 3.0

This article was previously published under Q78644

SUMMARY

Microsoft Excel version 3.0 does not have a menu command to perform global search and replace operations on cell notes. Choosing Replace from the Formula menu only searches cell contents, not cell notes.

MORE INFORMATION

To replace all instances of a portion of text with another portion of text in cell notes, enter the following steps in a macro sheet:

   A1: Replace.notes
   A2: =INPUT("Replace What?",2)
   A3: =INPUT("Replace With?",2)
   A4: =IF(NOT(AND(A2,A3)),RETURN())
   A5: =FOR.CELL("current")
   A6: =NOTE(SUBSTITUTE(GET.NOTE(current),A2,A3))
   A7: =NEXT()
   A8: =RETURN()
				


To run the macro, use the following steps:
  1. Select cell A1. From the Formula menu, choose Define Name, and choose the Command in the Macro box. Choose the OK button.
  2. Select the cells to be searched in a worksheet.
  3. From the Macro menu, choose Run. Select the macro, and choose the OK button.

REFERENCES

"Microsoft Excel User's Guide," version 3.0, page 164, 239-252

Modification Type:MajorLast Reviewed:2/11/2002
Keywords:KB78644