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

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

  • حسونة حسين changed the title to كود لترتيب الرتب تلقائياً
قام بنشر

السلام عليكم و رحمة الله

استخدم هذا الكود

Sub ReArrange()
Dim Arr, Rtb, Tmp
Dim WF As Object
Dim x As Integer, i As Long, p As Long
Set WF = WorksheetFunction
Arr = Range("B2:C8").Value
Rtb = Array("السابعة", "السادسة", "الخامسة", _
"الرابعة", "الثالثة", "الثانية", "الاولى")
ReDim Tmp(1 To UBound(Arr, 1), 2)
For i = LBound(Rtb) To UBound(Rtb)
Tmp(i + 1, 1) = Replace(Arr(i + 1, 2), Arr(i + 1, 2), Rtb(i))
Tmp(i + 1, 0) = WF.Index(Range("B2:C8"), WF.Match(Rtb(i), _
Range("C2:C8"), 0), 1)
Next
Range("B2").Resize(UBound(Tmp, 1), 2).Value = Tmp
End Sub

 

  • 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