اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

  • أفضل إجابة
قام بنشر

جرب هذا الكود

Option Explicit
Sub extract_Data()
  Dim Source_sheet As Worksheet
  Dim Target_sheet As Worksheet
  Dim Ism, R_to_copy As Range
  Dim Find_rg As Range

Set Source_sheet = Sheets("sheet1")
Set Target_sheet = Sheets("sheet2")

If Target_sheet.Range("B4") = "" Then
 Target_sheet.Range("B4") = "خالد"
End If
 
 Ism = Target_sheet.Range("B4")
 Set Find_rg = Source_sheet.Cells.Find(Ism, lookat:=1)
  If Not Find_rg Is Nothing Then
    Set R_to_copy = Find_rg.Offset(2).Resize(20, 4)
    Target_sheet.Range("B6").Resize(20, 4).Value = _
    R_to_copy.Value
  End If
 
End Sub

الملف مرفق

Khaled.xlsm

  • Like 3

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information