اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

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

قام بنشر

جرب هذا الكود

Option Explicit
Sub copy_data()
Dim my_rg As Range
Dim col#, x#

Set my_rg = Sheets("sheet1").Range("b2", Range("b3").End(4))

col = Sheet2.Rows(2).Find(vbNullString, after:=Cells(2, Columns.Count) _
, SearchDirection:=1).Column
If col > 1 Then
 x = Application.CountIf(Sheet2.Rows(2), "<>" & "") * 2 - 1
 col = Sheet2.Rows(2).Find(vbNullString, after:=Cells(2, x), _
 SearchDirection:=1).Column + 1
End If

Sheet2.Cells(2, col).Resize(my_rg.Rows.Count, 1).Value = my_rg.Value
End Sub

الملف مرفق

 

salim_test.xlsm

  • Like 2

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