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

ممكن معرفه اين الخظأ فى الكود


abuhanen10

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

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

اجعل الكود هكذا

Sub الاصغر()
Range("B2:J1000").Sort Key1:=Range("B2:B1000"), Order1:=xlAscending, Key2:=Range("H2:H1000"), Order2:=xlDescending, Header:=xlNo
End Sub

 

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

13 ساعات مضت, زيزو العجوز said:

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

اجعل الكود هكذا


Sub الاصغر()
Range("B2:J1000").Sort Key1:=Range("B2:B1000"), Order1:=xlAscending, Key2:=Range("H2:H1000"), Order2:=xlDescending, Header:=xlNo
End Sub

الف شكر لحضرتك

لكن للاسف الترتيب اصبح ابجدى كما هوموضح 

فى نفس الملف بعد التعديل

 

2ترتيب.rar

رابط هذا التعليق
شارك

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

اليك الكود بعد التعديل

Sub الاصغر()
Dim ws As Worksheet
Dim LR As Long
Set ws = Sheets("ورقة1")
LR = ws.Range("B" & Rows.Count).End(xlUp).Row
ws.Range("B2:J" & LR).Sort Key1:=ws.Range("H2"), Order1:=xlDescending, Key2:=ws.Range("B2"), Order2:=xlAscending, Header:=xlNo
MsgBox LR
End Sub

 

رابط هذا التعليق
شارك

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