You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

In Numbers, how to target empty cells and replace with text

Leaving the find field empty disables "replace" to be able to add text to all empty fields. A use case would be to replace emptiness with the word "none".


I found this 2010 era workaround, but the instructions about where to put the script leads to dead ends, so I assume things in the MacOS have changed 13 years later.

find and replace on empty cells - Apple Community


What is the best way to do this in Sonoma?


MacBook Pro (2017 – 2020)

Posted on Nov 5, 2023 1:45 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 5, 2023 2:20 PM

Follow these instructions for installing the script.


This is very basic, it will only fill the selected cells (a whole table if you want).


set temp to display dialog "Replacement value" default answer ""
if button returned of temp is "OK" then
	set replacementText to text returned of temp
	tell application "Numbers"
		tell every table of active sheet of front document
			tell selection range
				set (value of cells whose value is missing value) to replacementText
			end tell
		end tell
	end tell
end if



2 replies
Question marked as Top-ranking reply

Nov 5, 2023 2:20 PM in response to PTboy

Follow these instructions for installing the script.


This is very basic, it will only fill the selected cells (a whole table if you want).


set temp to display dialog "Replacement value" default answer ""
if button returned of temp is "OK" then
	set replacementText to text returned of temp
	tell application "Numbers"
		tell every table of active sheet of front document
			tell selection range
				set (value of cells whose value is missing value) to replacementText
			end tell
		end tell
	end tell
end if



In Numbers, how to target empty cells and replace with text

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.