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

ترحيل حسب اسم العمود


إذهب إلى أفضل إجابة Solved by محمد هشام.,

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

بعد اذن الاستاد هشام واثراء للموضوع هذا حل اخر بالاكواد

Option Explicit

Sub test()
Dim ws As Worksheet: Set ws = Sheets("Feuil2")
Dim lr1, r
Dim x1, x2
r = 2
Application.ScreenUpdating = False
ws.Range("g2:j1000").ClearContents
With Sheets("Feuil1")
lr1 = .Cells(Rows.Count, 1).End(3).Row
For x1 = 1 To 4
For x2 = 7 To 11
If .Cells(1, x1).Text = ws.Cells(1, x2).Text Then
.Cells(2, x1).Resize(lr1).Copy ws.Cells(2, x2).Resize(lr1)
GoTo 1
End If
Next x2
1: Next x1
End With
Application.ScreenUpdating = True
End Sub

 

Copie de TRANSFER-COLONE_Marcel32-v12.xlsm

  • Like 2
  • Thanks 1
رابط هذا التعليق
شارك

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