条件で行の色を変える方法

「指定のセルが空白でなければ」→「その行の背景色を変える」という方法はありますでしょうか。

[セルの条件付きハイライト]で入力されたセルだけは色の変更が出来たのですが、その行全体の色を変更する方法がわかりません。


そもそもそんな事が出来るのかが分からないのですが、視覚的に判断出来るようにしたいです。


もし、ご存知の方がいましたら、可能か不可能かだけでもご教授頂けませんか。

宜しくお願いします。

iMac, macOS Sierra (10.12.1), Numbers v4.0.5

投稿日 2016/12/06 05:56

返信
返信: 5

2016/12/07 05:07 T22T への返信

訂正(すみません):色の設定部分が抜けていました。


set userColor to choose color

set whiteColor to {65535, 65535, 65535}

tell front document of application "Numbers"

tell active sheet

tell table "Table 2"

repeat with i from 1 to count of rows

if value of (cell 1 of row i) is missing value then

set background color of row i to whileColor

else

set background color of row i to userColor

end if

end repeat

end tell

end tell

end tell

ユーザがアップロードしたファイル

2016/12/06 19:35 T22T への返信

例えば、次のAppleScriptでは、Numbers.appで表示しているシートのTable 2という名前の表の行頭のセルが空白であれば、その行の背景色を白色にして、空白でない場合にはユーザーが選んだ色にします。 但し、この処理は自動では実行されず、ユーザー自身が実行の開始を手作業で行う必要があります。


tell front document of application "Numbers"

tell active sheet

tell table "Table 2"

repeat with i from 1 to count of rows

if value of (cell 1 of row i) is missing value then

set background color of row i to whileColor

else

set background color of row i to userColor

end if

end repeat

end tell

end tell

end tell

このスレッドはシステム、またはAppleコミュニティチームによってロックされました。 問題解決の参考になる情報であれば、どの投稿にでも投票いただけます。またコミュニティで他の回答を検索することもできます。

条件で行の色を変える方法

Apple サポートコミュニティへようこそ
Apple ユーザ同士でお使いの製品について助け合うフォーラムです。Apple Account を使ってご参加ください。