[ 初めての方へ | 一覧(最新更新順) | 全文検索 | 過去ログ ]
『同じ値のセルがあった際、そのセルと同行の値を自動入力する』(こんか)
重複するセルがあった際に、そのセルと同行のセルに入力された値と同じ値が自動入力されるようにしたいです。
例えばA列B列の二つがあったとして、A1とA4が同じ値であった場合、B1に入力したらB4にも同じ値が自動で入るようにしたいです。
何か方法がありましたら、教えていただきたいです。
< 使用 Excel:Excel2013、使用 OS:Windows10 >
Dim c As Range, cc As Range If Target.Count <> 1 Then Exit Sub If Target.Value = "" Then Exit Sub For Each c In Target.EntireRow.SpecialCells(2) For Each cc In c.EntireColumn.SpecialCells(2) If c.Value = cc.Value And c.Address <> cc.Address Then Application.EnableEvents = False Cells(cc.Row, Target.Column).Value = Target.Value Application.EnableEvents = True End If Next cc Next c End Sub (mm) 2020/05/14(木) 13:22
[ 一覧(最新更新順) ]
YukiWiki 1.6.7 Copyright (C) 2000,2001 by Hiroshi Yuki.
Modified by kazu.