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

اضافة border ورقم تسلسل


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

اريد عند الضغط على زر Border  يتم اضافة بوردرللخلايا التي توجد بها بيانات فقط .
و اريد عند الضغط على زر رقم التسلسل ان يثم اضافة رقم تسلسل لكل اسم بحيت يكون الاسم الاول رقم التسلسلي 1 و الاسم التاني رقم التسلسلي 2 و هكذا الى اخر اسم 

Capture.JPG

has.rar

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

الاخ الحبيب

جرب المرفق هل هو طلبك

تم عمل زر واحد فقط للسريل والحدود ان شاء الله ينال اعجابك

 

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

Sub hossam()
Columns("A:E").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    Selection.Borders(xlEdgeBottom).LineStyle = xlNone
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Dim Lr As Integer
Lr = Cells(Rows.Count, "B").End(xlUp).Row
With Sheets("وقة 2").Range("A3:a100000")
            .ClearContents
End With
[a2] = 1
hh = Application.WorksheetFunction.CountA(Sheets("ورقة 2").Range("b2:b100000"))
If hh > 1 Then
With Sheets("ورقة 2").Range("A3:a" & Lr)
            .Formula = "=sum(A2+1)"
            .Value = .Value
End With
End If
Range("A1:E" & Lr).Select
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlDashDotDot
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlMedium
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlDash
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlDash
        .ThemeColor = 4
        .TintAndShade = 0.399945066682943
        .Weight = xlThin
    End With
End Sub

اللهم اجعلنا ممن يقيم حدودك و لا تجعلنا ممن يضيعها

تقبل تحياتى :fff:

has.zip

تم تعديل بواسطه الصـقـر
  • Like 1
رابط هذا التعليق
شارك

 

حلك حل عملاق اخى واستاذى الصقر واقدم لكم حلى المتواضع

بدون VBA

 has22.rar

تم تعديل بواسطه صلاح المصرى
  • 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