Excel: Replacing Text in Cell Notes

Last reviewed: November 29, 1994
Article ID: 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


KBCategory: kbusage
KBSubcategory:

Additional reference words: 3.0 3.00 4.0 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.