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

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

قام بنشر

الاعزاء الكرام ،،،،،،،،،،،،، صباح الخيرات

احتاج الى تعديل في الكود التالي بحيث يقوم بعملية الفرز ولكن  بتعديل تنسيق الاعمدة المفروزة الى " نص " .

 

Range("F5:G1000").Select
    ActiveWorkbook.Worksheets("Groups").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Groups").Sort.SortFields.Add Key:=Range("G5:G1000") _
        , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortTextAsNumbers
    With ActiveWorkbook.Worksheets("Groups").Sort
        .SetRange Range("F5:G1000")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
   End With

 

وتقبلوا خالص الود ،،،

قام بنشر

أضف السطر التالي على الكود

Range("G5:G1000").NumberFormat = "@"

وهذا الكود تبعك ومضاف عليه السطر

Range("F5:G1000").Select
    ActiveWorkbook.Worksheets("Groups").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Groups").Sort.SortFields.Add Key:=Range("G5:G1000") _
        , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortTextAsNumbers
    '----
    Range("G5:G1000").NumberFormat = "@"
    '----
    With ActiveWorkbook.Worksheets("Groups").Sort
        .SetRange Range("F5:G1000")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
   End With
'

 

تحياتي

  • Like 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