P109 Search and Replace Cell Contents

/P#

Meaning

Extra Parameters: /1{Parameter1} … /n{Nth Parameter}

109

Search for and replace the contents of a cell within a spreadsheet

/1 = sSheet – worksheet to be modified (by name or number)

/2 = sSearchFor – text to be modified

/3 = sReplaceWith – replacement text

/4 = sRange – Specify a range, or omit to use ‘used range’

/5 = bCaseSensitive – “TRUE” or “FALSE”

/6 = bLookAtPart – “TRUE” or “FALSE”

/7 = bMatchByte – “TRUE” or “FALSE”

This special process allows you to search for text within cells and replace it with other text.

Special Parameters Described in Detail

/1{sSheet} Name of the sheet to modify. Required.

/2{sSearchFor} A string that will be searched for and replaced. Required.

/3{sReplaceWith} A string that is the replacement text. Required.

/4{sRange} A string to optionally specify the range to do the search and replace on. For example /3“D:D” will do column D only.

/5{bCaseSensitive} “TRUE” to check case sensitivity or “FALSE” to ignore it.

/6{bLookAtPart} “TRUE” to replace the search string wherever it is found or “FALSE” to replace it only when it comprises the entire cell contents.

/7{bMatchByte} “TRUE” to match double byte to single byte characters or “FALSE” to ignore it.

Examples:

EXAMPLE 1 Search for "Marine Science" and replace with "Oceanography"