Probier das…
Show Plain Text
- set columnName to "adress"
- set cityName to text returned of (display dialog "Bitte Stadtnamen eingeben" default answer "" buttons {"OK"} default button 1)
- tell application "Numbers"
- tell table 1 of active sheet of document 1
- tell column columnName
- repeat with rowIndex from 2 to (count rows)
- set stringValue to value of cell rowIndex
- if stringValue is not missing value and stringValue is not "" then
- try
- set value of cell rowIndex to stringValue & ", " & cityName
- on error
- exit repeat
- end try
- end if
- end repeat
- end tell
- end tell
- end tell
Dem screenshot entnehme ich, dass die Spalte adress heisst. Wenn das nicht so ist, ändere die erste Zeile im code.
Dann wirst du nach dem Stadtnamen gefragt. Das script hängt dann den Namen in jeder Zelle der Spalte an.