I’m stuck with a simple problem because I’m not professional with vba creating.
I have a code to add a separator “@” between the two different languages in column “E” and it was working perfectly till I added a line to the code (“thisworkbook.save”) to save the sheet after runing the code any this caused to make the code run slowly I think because it check each cell to add the separator then save the sheet before moving to the next cell to run the same task
So, I need your help to make the code finish all cells that need the separator “@” first and to save the sheet at the end not after adding the the symbol to each cell
Sub englishATarabic()
Dim L, count As Long, B, E As Range
For R = 1 To ActiveSheet.Cells(ActiveSheet.Rows.count, "E").End(xlUp).Row
Set B = ActiveSheet.Range("B" & R)
Set E = ActiveSheet.Range("E" & R)
If E.Value <> "" And B.Value <> "" And IsNumeric(B.Value) Then
If InStr(E.Text, "@") < 1 Then
count = 0
For L = 1 To Len(E.Text)
If AscW(Mid(E.Text, L, 1)) < 1000 Then count = count + 1 Else Exit For
Next
E.Value = Left(E.Value, count) & "@" & Right(E.Value, Len(E.Value) - count)
ThisWorkbook.Save
End If
End If
Next
End Sub