Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t4035
- ---------------------------------
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim c As Range
- If Target.Cells.CountLarge > 1 Then Exit Sub
- Application.ScreenUpdating = False
- Set c = Cells(Target.Row, 1)
- If c.Value = Empty Then Exit Sub
- With c
- .Offset(, 1).Formula = "=IFERROR(VLOOKUP(" & c.Address & ",ورقة1!$A$1:$D$12,2,0),"""")"
- .Offset(, 2).Formula = "=IFERROR(VLOOKUP(" & c.Address & ",ورقة1!$A$1:$D$12,3,0),"""")"
- .Offset(, 3).Formula = "=IFERROR(VLOOKUP(" & c.Address & ",ورقة1!$A$1:$D$12,4,0),"""")"
- .Offset(, 1).Resize(1, 3).Value = .Offset(, 1).Resize(1, 3).Value
- End With
- Application.ScreenUpdating = True
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement