اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

تلوين اكثر من كلمة مكررة فى عدة خلايا


osama k q
إذهب إلى أفضل إجابة Solved by سليم حاصبيا,

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

السلام عليكم 

الاساتذه الكرام ارجو المساعده فى هذا الموضوع 

هل يمكن ان اجعل اكثر من كلمه مكرره فى عده خلايا بالوان مختلفه 

الذى ابحث عنه موجود بوضوح اكثر فى ملف الاكسل المرفق 

اتمى وجود حل لهذه وشكرا جزيلا

تلوين الكلمات.xlsx

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

  • أفضل إجابة

Try This File

Option Explicit
 
Sub Regex_position(RG As Range, ByVal My_ExP As String)
    Dim rex As Object
    Dim Array_Pos() As Integer
    Dim Array_Mot() As String
    Dim Cnt%
    Dim My_Match, Sing_Match
    Dim K%
Set rex = CreateObject("Vbscript.Regexp")
 With rex
  .Pattern = My_ExP: .ignorecase = True: .Global = True
 End With

 If rex.test(RG) Then
   K = RG.Row
  Set My_Match = rex.Execute(RG)
   Cnt = 0
   For Each Sing_Match In My_Match
    ReDim Preserve Array_Pos(Cnt)
    ReDim Preserve Array_Mot(Cnt)
     Array_Pos(Cnt) = Val(Sing_Match.firstindex + 1)
     Array_Mot(Cnt) = Sing_Match
    Cnt = Cnt + 1
    Next
   For Cnt = LBound(Array_Pos) To UBound(Array_Pos)
   With RG.Characters(Array_Pos(Cnt), Len(Array_Mot(Cnt))).Font
    .ColorIndex = Sheets("Formula"). _
    Range("K1").Interior.ColorIndex
    .Size = 18: .Bold = True
    Sheets("Formula").Cells(K, "G") _
    .Offset(, Cnt) = Array_Mot(Cnt)
   End With
    Next
  End If

End Sub
'++++++++++++++++++++++++++++++++++++

Sub Colorize_Please()
 reset_me
Dim st, i%, lr
lr = Sheets("Formula").Cells(Rows.Count, 5).End(3).Row
st = "[A-Za-z]\d{2}"
  For i = 3 To lr
  Call Regex_position(Sheets("Formula").Range("E" & i), st)
  Next
Application.ScreenUpdating = True
End Sub
'+++++++++++++++++++++++++++++++++++++++++++++
Sub reset_me()
Dim x
With Sheets("Formula")
 x = .Cells(Rows.Count, 5).End(3).Row
.Range("G3:N" & x).ClearContents
    With .Range("E3:E" & x).Font
      .ColorIndex = 1
      .Bold = True: .Size = 14
    End With
End With
End Sub

 

osama.xlsm

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

  • 3 weeks later...

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