1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Excel・Googleスプレッドシートで時間差を計算!TIMEVALUE

Posted at

TIMEVALUE関数とは?

TIMEVALUE 関数は、文字列形式で入力された「時間」をスプレッドシートが認識できる時間値(数値形式)に変換する関数です。これにより、時間同士の引き算や加算が簡単に行えるようになります。

基本的な使い方

TIMEVALUE(時間の文字列) の形式で使用し、時間を0〜1の小数値(1日=1)に変換します。

例:8時30分15秒から17時45分50秒の時間差を計算する
セルA1:08:30:15
セルB1:17:45:50

=TIMEVALUE(B1) - TIMEVALUE(A1)  

この計算結果は 0.38356 となります。これは 1日(24時間)を1とする小数形式なので、これを時間に変換する必要があります。

変換方法

=TIMEVALUE(B1) - TIMEVALUE(A1)  
  • 時間
=(TIMEVALUE(B1) - TIMEVALUE(A1)) * 24
=(TIMEVALUE(B1) - TIMEVALUE(A1)) * 24 * 60
=(TIMEVALUE(B1) - TIMEVALUE(A1)) * 24 * 60 * 60

まとめ

TIMEVALUE 関数を使うことで、文字列形式の時間をスプレッドシートが認識できる数値に変換し、計算が可能になります。分や秒を含む複雑な時間計算も簡単に行えます。

参照

https://support.google.com/docs/answer/3267350?hl=en
https://support.microsoft.com/ja-jp/office/timevalue-%E9%96%A2%E6%95%B0-0b615c12-33d8-4431-bf3d-f3eb6d186645

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?