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

عايز لون يظهر للخلية عند حدوث شرط معين يوجد مرفق للتوضيح


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

جرب هذا الكود

لا أعلم سبب الجحم الكبير لهذا الملف (اكثر من 5 ميغا)

Option Explicit

Sub Talween()
With Sheets("sheet1")
Dim s_rg As Range, r%, x, my_color%
.Range("r:r").Interior.ColorIndex = 0
Set s_rg = .Range("r:r").Find("المتبقي")
  r = s_rg.Row
  x = r
    Do
    Select Case Cells(r + 1, "R")
     Case Is >= Cells(r + 1, "t") / 2
      my_color = 4
     Case Is = 0: my_color = 3
        Case Is < Cells(r + 1, "t") / 2
      my_color = 6
      Case Else: my_color = 0
     End Select
     Cells(r + 1, "R").Interior.ColorIndex = my_color
     Set s_rg = .Range("r:r").FindNext(s_rg)
   r = s_rg.Row
   If x = r Then Exit Do
    Loop
End With
End Sub

الملف مرفق

 

Talween.xlsm

  • 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