toandiennuoc123
Thành viên thường trực




- Tham gia
- 7/3/12
- Bài viết
- 239
- Được thích
- 9
Nhờ các Pro sửa giúp mình code liên kết Sheet, yêu cầu của nó là : Vùng H4:Q13 được tự động link sang các Sheet2 đến Sheet9. Cám ơn các bạn nhiều nhiều.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S2").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S3").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S4").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then Sheets("S5").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then Sheets("S6").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then Sheets("S7").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S8").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S9").Range("H4:Q13").Value = Range("H4:Q13").Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S2").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S3").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S4").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then Sheets("S5").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then Sheets("S6").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then Sheets("S7").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S8").Range("H4:Q13").Value = Range("H4:Q13").Value
End If
If Not Intersect(Range("H4:Q13"), Target) Is Nothing Then
Sheets("S9").Range("H4:Q13").Value = Range("H4:Q13").Value
End Sub