Copying Data based on number from one sheet to another
Closed
Aivaras
-
18 Mar 2015 à 15:43
MaxStart Posts 338 Registration date Tuesday 3 March 2015 Status Contributor Last seen 3 July 2015 - 21 Mar 2015 à 22:37
MaxStart Posts 338 Registration date Tuesday 3 March 2015 Status Contributor Last seen 3 July 2015 - 21 Mar 2015 à 22:37
Related:
- Copying Data based on number from one sheet to another
- How to copy data from one excel sheet to another - Guide
- How to copy data to multiple worksheets in Excel - Guide
- How to transfer data from one Excel sheet to another? - Guide
- Excel link to another sheet - Guide
- How to export data from facebook - Guide
1 response
MaxStart
Posts
338
Registration date
Tuesday 3 March 2015
Status
Contributor
Last seen
3 July 2015
69
21 Mar 2015 à 22:37
21 Mar 2015 à 22:37
Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(Target.Row, Target.Column).Value = "nar1" Then
Cells(Target.Row, Target.Column).Value = Sheet2.Cells(1, 1).Value
Cells(Target.Row, Target.Column + 1).Value = Sheet2.Cells(1, 1 + 1).Value
Cells(Target.Row, Target.Column + 2).Value = Sheet2.Cells(1, 1 + 2).Value
ElseIf Cells(Target.Row, Target.Column).Value = "nar2" Then
Cells(Target.Row, Target.Column).Value = Sheet2.Cells(2, 1).Value
Cells(Target.Row, Target.Column + 1).Value = Sheet2.Cells(2, 1 + 1).Value
Cells(Target.Row, Target.Column + 2).Value = Sheet2.Cells(2, 1 + 2).Value
End If
End Sub