Hi SHG,
The code is already in the sheet module of information sheet. No problem, I'm pasting it here for your reference.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
If Target.Column <> 3 Then Exit Sub
With Target
If .Count = 1 Then
Select Case .Column
Case 3
Select Case .Value
Case ""
Application.ScreenUpdating = False
Application.EnableEvents = False
'Target.Offset(, -1).Value = "Left"
Range("d" & .Row).Resize(, 1).Value = "L"
Range("e" & .Row).Resize(, 8).Value = ""
Application.EnableEvents = True
Application.ScreenUpdating = True
End Select
End Select
End If
End With
With Range("a4:a90")
Application.ScreenUpdating = False
Application.EnableEvents = False
.FormulaR1C1 = "=IF(RC[2]>0,SUM(MAX(R3C:R[-1]C),1),"""")"
.Formula = .Value
Application.EnableEvents = True
Application.ScreenUpdating = True
End With
Application.ScreenUpdating = False
Application.EnableEvents = False
If Not Intersect(Target, Range("c:c")) Is Nothing Then
For Each c In Worksheets("Semester1").Range("b10:b90")
If c.Value = "" Then
c.Range("c").Resize(, 5).Value = "L" 'getting error 1004
c.Range("k").Resize(, 5).Value = "L" 'getting error 1004
c.EntireRow.Hidden = True
End If: Next c
End If
If Not Intersect(Target, Range("c:c")) Is Nothing Then
For Each c In Worksheets("Semester2").Range("b10:b90")
If c.Value = "" Then
c.Resize.EntireRow = ""
c.EntireRow.Hidden = True
End If: Next c
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
MsgBox "done"
End Sub
Thanking you.
Bookmarks