HiiHahWIKI - making some notes for... -
行の最終更新日を、あるセルに自動で入力させる方法
をテンプレートにして作成
開始行:
*行の最終更新日を、あるセルに自動で入力させる方法 [#t2ea9...
あるセルの情報を更新した際、その行のあるカラムに最終更新...
例えば、以下の様な表があって、「C7」セルに値を入力すると
&ref(1.PNG);
「E7」セルに更新日が自動で入力されます。
&ref(2.PNG);
これはVBSで実現してます。
サンプルファイルを添付しますので、興味があれば見てみてく...
-[[サンプルエクセル:http://www.hiroha.info/index.php?plug...
ちなみに、VBSについてはシートを右クリック→コードの表示で...
VBSの内容は以下の通り。
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRng As Range, R As Range, L As Range
Dim LastUpdated As Integer
Set MyRng = Intersect(Target, Range("B2:D18"))
If MyRng Is Nothing Then Exit Sub
LastUpdated = 5
For Each R In MyRng.Rows
Cells(R.Row, LastUpdated) = Now
Next
End Sub
***参考サイト [#y7750f74]
-http://okwave.jp/qa/q2827109.html
-http://officetanaka.net/excel/function/function/indirect...
-http://www.eurus.dti.ne.jp/~yoneyama/Excel/vba/vba_event...
-http://excelvba.pc-users.net/fol6/6_1.html
-http://homepage1.nifty.com/rucio/main/technique/MsgBox.htm
-
終了行:
*行の最終更新日を、あるセルに自動で入力させる方法 [#t2ea9...
あるセルの情報を更新した際、その行のあるカラムに最終更新...
例えば、以下の様な表があって、「C7」セルに値を入力すると
&ref(1.PNG);
「E7」セルに更新日が自動で入力されます。
&ref(2.PNG);
これはVBSで実現してます。
サンプルファイルを添付しますので、興味があれば見てみてく...
-[[サンプルエクセル:http://www.hiroha.info/index.php?plug...
ちなみに、VBSについてはシートを右クリック→コードの表示で...
VBSの内容は以下の通り。
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRng As Range, R As Range, L As Range
Dim LastUpdated As Integer
Set MyRng = Intersect(Target, Range("B2:D18"))
If MyRng Is Nothing Then Exit Sub
LastUpdated = 5
For Each R In MyRng.Rows
Cells(R.Row, LastUpdated) = Now
Next
End Sub
***参考サイト [#y7750f74]
-http://okwave.jp/qa/q2827109.html
-http://officetanaka.net/excel/function/function/indirect...
-http://www.eurus.dti.ne.jp/~yoneyama/Excel/vba/vba_event...
-http://excelvba.pc-users.net/fol6/6_1.html
-http://homepage1.nifty.com/rucio/main/technique/MsgBox.htm
-
ページ名: