メインコンテンツへスキップ

作成した時刻と最終変更時刻を取得してセルに挿入します

この記事では、現在のブック情報の作成時刻と最終変更時刻を取得し、現在のブック情報の作成時刻と最終変更時刻をExcelのセルに挿入する方法について説明します。

Infoコマンドを使用してExcelで作成時刻と最終変更時刻を取得します

詳細プロパティ機能を使用して、Excelで作成時刻と最終変更時刻を取得します

VBAコードを使用してExcelのセルに作成時刻と最終変更時刻を挿入します

Kutools for Excelを使用して、作成した時刻と最終変更時刻をセル/ヘッダー/フッターに挿入します 良いアイデア3


矢印青い右バブル Infoコマンドを使用してExcelで作成時刻と最終変更時刻を取得します

Microsoft Excel 2010/2013のバックステージビューで、現在のブックの正確な作成時刻と最終変更時刻を確認できます。

クリック File > インフォ、および舞台裏ビューの右側に、 関連する日付 情報。 下 関連する日付 タイトルには、最終変更時刻、作成時刻、および最終印刷時刻が一覧表示されます。 次のスクリーンショットを参照してください。

-2

 

注: この方法は、Microsoft Excel2010 / 2013でのみ使用できます。 Excel2007では無効です。


矢印青い右バブル詳細プロパティ機能を使用して、Excelで作成時刻と最終変更時刻を取得します

実際には、[ドキュメントのプロパティ]ダイアログボックスで、現在のブックの作成時刻と最終変更時刻の両方を取得できます。
ステップ 1:開く 高度なプロパティ ダイアログボックス:

Excel 2007では、 Office ボタン> 準備 > プロパティ、と ドキュメントのプロパティ ツールバーの下にバーが表示されたら、クリックします ドキュメントのプロパティ > 高度なプロパティ、スクリーンショットを参照してください:

doc-挿入-変更-時間-3-3
-1
doc-挿入-変更-時間-4-4

 

Excel 2010/2013で、 File > インフォ > プロパティ > 高度なプロパティ.

doc-挿入-変更-時間-4-4

ステップ 2: の中に 高度なプロパティ ダイアログボックスの[統計]タブに、作成時刻と最終変更時刻が表示されます。 次のスクリーンショットを参照してください。

doc-挿入-変更-時間-4-4


矢印青い右バブル VBAコードを使用してExcelのセルに作成時刻と最終変更時刻を挿入します

次のVBAマクロは、現在のブック情報の作成時刻と最終変更時刻をセルに直接挿入するのに役立ちます。

作成時刻と最終変更時刻の両方をExcelに挿入します

ステップ 1:を長押しします 頭の中 + F11 キーを押すと、Microsoft Visual Basic forApplicationsウィンドウが開きます。

ステップ 2:クリック インセット >> モジュール、モジュールウィンドウに次のマクロを貼り付けます。

VBAコード:作成時刻と最終変更時刻の両方をExcelに挿入します

Sub Workbook_Open()
Range("A1").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), "short date")
Range("A2").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "short date")
End Sub

ステップ 3:を押す F5 このマクロを実行するためのキー。 そして、作成日と最終変更日がセルA1とセルA2に別々に挿入されます。

Note:必要に応じて、VBの宛先セルを変更できます。

ブックの最終変更時刻をExcelに挿入します

ステップ 1:を長押しします 頭の中 + F11 キーを押すと、Microsoft Visual Basic forApplicationsウィンドウが開きます。

ステップ 2:クリック インセット >> モジュール、モジュールウィンドウに次のマクロを貼り付けます。

Public Function ModDate()
ModDate = Format(FileDateTime(ThisWorkbook.FullName), "m/d/yy h:n ampm")
End Function

ステップ 3:次に、このコードを保存して閉じ、ワークシートに戻り、空白のセルに次の数式を入力します。 = ModDate()、を押して 入力します キー。 次に、最後に変更された時刻をセルに挿入します。

-2

ブックの作成時刻をExcelに挿入します

ステップ 1:を長押しします 頭の中 + F11 キーを押すと、Microsoft Visual Basic forApplicationsウィンドウが開きます。

ステップ 2:クリック インセット >> モジュール、モジュールウィンドウに次のマクロを貼り付けます。

Function CreateDate() As Date
CreateDate = ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
End Function

ステップ 3:このコードを保存して閉じ、ワークシートに戻り、空白のセルに次の数式を入力します = CreateDate()、を押して 入力します key.and作成日は、次のスクリーンショットのようにセルに挿入されます。

-2

注: セルが日付形式でない場合、奇妙な数値が表示される可能性があります。 このセルを次のようにフォーマットするだけです 日付 形式では、通常の日付として表示されます。


矢印青い右バブル Kutools for Excelを使用して、作成した時刻と最終変更時刻をセル/ヘッダー/フッターに挿入します

便利なツールをご紹介します-Kutools for Excel 300以上の便利な機能を含むものがあなたの作業効率を高めることができますか? そのと ワークブック情報を挿入する 機能を使用すると、ワークブックパス、ワークブック/ワークシート名、ユーザー名、または作成時刻と最終変更時刻をセル、ヘッダー、またはフッターにすばやく挿入できます。

Kutools for Excel, 以上で 300 便利な機能は、あなたの仕事をより簡単にします。 

無料インストール Kutools for Excel、以下のようにしてください:

1。 クリック クツールズプラス > ワークブック > ワークブック情報を挿入する。 スクリーンショットを参照してください:
doc最終変更名2

2.次に、 ワークブック情報を挿入する ダイアログで、[情報]セクションから挿入する情報を確認し、挿入する場所を指定します。セル、フッター(左フッター、中央フッター、右フッター)、またはヘッダー(左ヘッダー、中央ヘッダー、右ヘッダー)。 スクリーンショットを参照してください:
ドキュメント挿入作成変更時刻1

3。 クリック Ok、およびチェックした情報が指定した場所に挿入されています。

ヒント。 ワークブック情報の挿入機能を無料で試用したい場合は、 Excel用のKutoolsを無料でダウンロードしてください まず、上記の手順に従って操作を適用します。

矢印青い右バブル ワークブック情報を挿入する


最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (21)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I LOOOOOOOOVE YOU!!!! TKSSSSSSS
This comment was minimized by the moderator on the site
I want to automatically create a space between each customer in excel how do i do this??
This comment was minimized by the moderator on the site
Hi Team, I need your help. I am having an excel file, there i want to find the modified date of a particular cell. Please help me with the coding here, if possible. Thanks in advance.
This comment was minimized by the moderator on the site
I learned why "Last Save Time" was not working for me. I put my function in my .XLA file, and "ThisWorkbook" was referring to the .XLA file itself. Therefore I needed to get Application.ActiveWorkbook (presumably the location of the function call), ending up with: Function DocumentProperty(PropertyName As String) ' 'You can refer to document properties either by index value or by name. The following list shows the available built-in document property names: 'Title Subject Author 'Keywords Comments Template 'Last Author Revision Number Application Name 'Last Print Date Creation Date Last Save Time 'Total Editing Time Number of Pages Number of Words 'Number of Characters Security Category 'Format Manager Company 'Number of Bytes Number of Lines Number of Paragraphs 'Number of Slides Number of Notes Number of Hidden Slides 'Number of Multimedia Clips Hyperlink Base Number of Characters (with spaces) Call Application.Volatile(True) Dim ActiveUserWorkbook On Error Resume Next Set ActiveUserWorkbook = Application.ActiveWorkbook If Err.Number 0 Then DocumentProperty = "!!! Error getting Application.ActiveWorkbook: " & Err.Description Exit Function End If DocumentProperty = ActiveUserWorkbook.BuiltinDocumentProperties(PropertyName) If Err.Number 0 Then DocumentProperty = "!!! Unknown Property Name !!!" Exit Function End If End Function
This comment was minimized by the moderator on the site
I see that "Last Save Time" is only referenced ONCE in the code. I'm using Excel 2010.When I put "Last Save Time" into a function, even with Application.Volatile(true), the value never updates. Then I noticed that the value returned by "Last Save Time" does not appear in the Excel 2010 "Properties" page NOR any of the tabs in the "Advanced Properties" dialog. Could "Last Save Time" be some relic?
This comment was minimized by the moderator on the site
Thanks for the help, but I also had a problem with the cell not updating after a save without having to first close and reopen the workbook. I added the following code to the workbook which refreshes after a save event: Private Sub Workbook_AfterSave(ByVal Success As Boolean) If Success Then ActiveSheet.Calculate End If End Sub That did the trick for me. Hope it helps.
This comment was minimized by the moderator on the site
Could this be modified to display the Created Date of other closed files? I'd like to compare the Created Date of a file on my Desktop to a file on a public web server. I could create the formula to use your functions...CreateDate() of local file to CreateDate() of web file...and alert me to a change. I appreciate your help. Bruce
This comment was minimized by the moderator on the site
very very very very very very very very helpful thanks
This comment was minimized by the moderator on the site
Hiya Love love love this but sadly the date only is appearing in USA and in Australia we have dd/mm/yy I've tired changing it to this format using the "Date" section but have not had any luck. Any ideas?
This comment was minimized by the moderator on the site
Julie - in the VBA code use "dd/mm/yy hh:n" instead. That'll put the date in the "right" order! :lol:
This comment was minimized by the moderator on the site
Hey this was awesome. Is it possible to insert the created date and last modified date of a different workbook? I'm looking to create an index file that tells me when other documents were last updated. Thanks!!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations