0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

エクセルで小数点以下がある時だけ表示する

Posted at

標準のセルの書式設定の数値かユーザ定義にあるだろうと思ったらうまくいかなかったのでメモ

ユーザ定義

セルを選択して右クリック、セルの書式設置>ユーザー定義で以下を指定

# ,##0.###
//10->10.
//5.5->5.5

条件付き書式

ルールを作成

セルを選択してホーム>条件付き書式>新しいルール
スタイル>クラシック>数式を使用して、書式設定するセルを決定で以下の式を設定

=INDIRECT(ADDRESS(ROW(),COLUMN()))=TRUNC(INDIRECT(ADDRESS(ROW(),COLUMN())))

ユーザ書式の設定

書式>ユーザー設定の書式
フォント>色>自動
塗りつぶし>背景色>色なし
ユーザー定義で以下を指定

# ,##0
//10->10
//5.5->5.5

OKを3回くらい押して設定を終わる。

参考:エクセルで数字を入力時、小数点以下があれば少数表示(小数点以下3桁)、なければ整数表示をする|おたろく

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?