essmat قام بنشر مارس 6, 2019 قام بنشر مارس 6, 2019 مرفق ملف عايز لون يظهر للخلية عند حدوث شرط معين يوجد مرفق للتوضيح اريد جمع عمود الكمية بشرط تحققه فى عمود اخر مرفق ملف للتوضيح اكثر Book1.xlsx
سليم حاصبيا قام بنشر مارس 6, 2019 قام بنشر مارس 6, 2019 جرب هذا الكود لا أعلم سبب الجحم الكبير لهذا الملف (اكثر من 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 1
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.