tell application "Numbers"
	activate
	tell the front document
		set replaceKeys to {%@}
		set replaceValues to {%@}
		set sheetNumber to 1
		repeat with aSheet in sheets
			set theTable to the table 1 of sheet sheetNumber
			local cellString
			tell theTable
				repeat with theCell in cells
					set cellString to value of theCell as text
					if cellString contains "<$" then
						set x to 1
						repeat with key in replaceKeys
							set replaceValue to item x in replaceValues
							set the cellString to my replace_chars(cellString, key, replaceValue)
							set x to x + 1
						end repeat
						set the value of the theCell to cellString as string
					end if
				end repeat
			end tell
			set sheetNumber to sheetNumber + 1
		end repeat
		save
	end tell
	tell front document to save
end tell


on replace_chars(this_text, search_string, replacement_string)
	set AppleScript's text item delimiters to the search_string
	set the item_list to every text item of this_text
	set AppleScript's text item delimiters to the replacement_string
	set this_text to the item_list as string
	set AppleScript's text item delimiters to ""
	return this_text
end replace_chars
