Microsoft KB Archive/78644

= Excel: Replacing Text in Cell Notes =

Article ID: 78644

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Excel 3.0 Standard Edition

-



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(&quot;Replace What?&quot;,2) A3: =INPUT(&quot;Replace With?&quot;,2) A4: =IF(NOT(AND(A2,A3)),RETURN) A5: =FOR.CELL(&quot;current&quot;) 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.

