Apple Intelligence is now available on iPhone, iPad, and Mac!

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

How to change a cell's value from another cell?

I have Cell A1 where I can enter text manually


I want if I type an "X" in Cell A3, then A1 is cleared!


How can I do this?


Thanks

Posted on Jan 13, 2023 1:39 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 15, 2023 4:14 PM

If you know what that item is you can do it like this (where "Item 2" is the actual text of the second item in the pop up):


set f1 to format of cell "C4"
set value of cell "C4" to "Item 2"
set format of cell "C4" to f1


If the text you supplied is not an item in the pop up menu, it will turn the pop up into a pop up of one item with the text you provided.


Script Editor is an app. Look for it using Spotlight.

The shortcut download from SGIII will install itself. You need to be on OSX Monterey or greater to have and use shortcuts.

11 replies
Question marked as Top-ranking reply

Jan 15, 2023 4:14 PM in response to Jarmurmursz

If you know what that item is you can do it like this (where "Item 2" is the actual text of the second item in the pop up):


set f1 to format of cell "C4"
set value of cell "C4" to "Item 2"
set format of cell "C4" to f1


If the text you supplied is not an item in the pop up menu, it will turn the pop up into a pop up of one item with the text you provided.


Script Editor is an app. Look for it using Spotlight.

The shortcut download from SGIII will install itself. You need to be on OSX Monterey or greater to have and use shortcuts.

Jan 14, 2023 8:24 AM in response to Jarmurmursz

If you want to delete data from your spreadsheet before saving it as a template, maybe a shortcut or script from one of these threads will be useful:

In numbers I want to delete cell content … - Apple Community

in Numbers how to delete all entries belo… - Apple Community


One version is a shortcut you can download and install and try out. The other is a script that operates a little differently. The script can be run using the Script Editor application. Copy/paste it into a new document in that app. In Numbers, select the range of cells to be cleared. In Script Editor, hit the play button. I recommend using a copy of your document, not the real one, until you know it does what you want. You can easily create a shortcut from the script and we can modify either the existing shortcut or the script to better fit your needs (hopefully).



Jan 15, 2023 2:57 PM in response to Badunit

Hi SGIII


I am using automator,


Can you tell me why I am getting an error with this script


==============

on run {input, parameters}

tell application "Numbers"

activate

tell the first table of the active sheet of document 1

set the value of cell "C4" to item 2 <I want to set cell to 2nd item of pop up menu in numbers

end tell

end tell

return input

end run

===============


Also my numbers document is called xxx and it's on the desktop. this script opens my xxx document. How does it know to open xxx when we say "Document 1" in the script ?


Thanks

Jan 13, 2023 5:44 PM in response to SGIII

Thanks for getting back.


well, typically I have a template file in numbers which I use to make my orders.


so for every order, I make a copy of the template file and use it as my order file.


Therefore basically i typically make a copy of this file for every order I do.


so it’s like:


<template file>

<copyFor order 1>

<copy for order 2>


and so on.


So for example suppose I make a third copy of my template for order#3, and save it like this:


<copy for order 3>


But now as I fill out <copy of order 3> all to often I modify some settings in the file like bold some text or add a column, add some borders Ect….


when I save <copy of order 3>, to avoid redoing all these on the fly changes I just did, I also save the <copy of order 3> file as:


<template file>


so the <template file> is up to date also with all the latest changes.


But now the template file contains all the data entered from

<copy of order 3> file.


So when I need to make

<copy of order 4> file. I find myself resetting all the data in the <template file> every time.


it would be nice that after every time I get into this scenario and save my order file as the template file, that I would type an “X” in a random cell somewhere, and automatically all the data is reset so that my template file is ready to use and can start from a clean slate.


any suggestions on how to reset my infos in a numbers file automatically?


thanks




Jan 15, 2023 1:51 PM in response to Badunit

“One version is a shortcut you can download and install and try out.”


what’s a shortcut that I can install ??? What is this? An app?



“The other is a script that operates a little differently. The script can be run using the Script Editor application. Copy/paste it into a new document in that app. In Numbers, select the range of cells to be cleared. In Script Editor, hit the play button.”


where and how do I access the script Editor- application?



can a the script editor application also select specific items from a drop list in cells?


a little confused because I never striped scripts ?



How to change a cell's value from another cell?

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