Sub Circles1()
Dim c As Range
Dim MyRng As Range, v As Shape
Dim x As Integer, G As Integer, R As Integer, d As Integer
'================================================
G = 3 ' عمود رقم الجلوس
R = 1 ' صف الدرجات
Set MyRng = Range("c8:m35") ' نطاق الخلايا الذي تريد اضافة الدوائر فيها
'================================================
x = ActiveWindow.zoom
Application.ScreenUpdating = False
For Each c In MyRng
If Cells(c.Row, G) = 0 Or Cells(c.Row, G) = "" Then GoTo 1
If IsNumeric(Cells(R, c.Column)) And Not IsEmpty(Cells(R, c.Column)) And (c.Value < Cells(R, c.Column) Or c.Value = "غ" Or c.Value = "غـ" Or c.Value = "دون المستوى" Or c.Offset(1, 0).Value = "دون المستوى") And c.Value <> "" Then
Set v = ActiveSheet.Shapes.AddShape(msoShapeOval, c.Left + 1, c.Top + 1, c.Width - 2, c.Height - 2)
v.Fill.Visible = msoFalse
v.Line.ForeColor.SchemeColor = 10
v.Line.Weight = 0.25
d = d + 1
End If
1 Next
ActiveWindow.zoom = x
Application.ScreenUpdating = True
'MsgBox "تم إضافة " & d & " دائرة بنجاح", vbMsgBoxRtlReading, "الحمدلله"
End Sub
Sub RemoveCircles1()
Dim shp As Shape, d As Integer
For Each shp In ActiveSheet.Shapes
If shp.AutoShapeType = msoShapeOval Then shp.Delete: d = d + 1
Next shp
'MsgBox "تم حذف " & d & " دائرة بنجاح", vbMsgBoxRtlReading, "الحمدلله"
End Sub
=============================
G = 3 ' عمود رقم الجلوس
R = 1 ' صف الدرجات
اين هذا العمود الموجود قي الشهاده
واين هذا الصف ارجوكم