- Excel VBA 質問スレ Part42©2ch.net [無断転載禁止]©2ch.net
60 :k[]:2016/06/28(火) 22:17:15.33 ID:YsbJZi6Y - コード貼ります
Sub test() Dim i As Long, n As Long, dayoff As Object n = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row Cells.Interior.ColorIndex = 0 For i = 9 To n Set dayoff = Worksheets("休日").Range("A:A").Find(what:=Cells(i, 1)) If Not dayoff Is Nothing Then If dayoff.Offset(0, 1).Value <> "" Then Cells(i, 1).Resize(1, 14).Interior.Color = RGB(192, 192, 192) End If End If Next End Sub
|