mahmoudsakr قام بنشر نوفمبر 6, 2018 قام بنشر نوفمبر 6, 2018 ارجو الافاد الكود مش راضى يشتغل معايا على الاكسيل Sub testr() For i = 2 To 7 If Cells(i, 1).Value <= 50 Then Cells(i, 2).Value = ناجح Else Cells(i, 2).Value = راسب Next i End Sub
سليم حاصبيا قام بنشر نوفمبر 6, 2018 قام بنشر نوفمبر 6, 2018 الكود يكتب هكذا Option Explicit Sub test_Me() Dim i As Byte For i = 2 To 7 With Cells(i, 1) If .Value >= 50 Then Cells(i, 2) = "ناجح" Else Cells(i, 2) = "راسب" End If End With Next End Sub 2
سليم حاصبيا قام بنشر نوفمبر 8, 2018 قام بنشر نوفمبر 8, 2018 اكثر اختصاراً Option Explicit Sub test_Me() Dim i As Byte For i = 2 To 7 Cells(i, 2) = IIf(Cells(i, 1) >= 50, "ناجح", "راسب") Next 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.