|
下記コード早くする方法ありませんか?
100件ほど行うのですが結構時間掛かります。
お解りになり方アドバイスお願いします。
Sub 文字色変更50()
Dim i As Long, k As Long
Dim mySource As Worksheet
Dim myRange As Range, c As Range
Dim s1 As String
Dim s2 As String
ActiveSheet.Unprotect
Range("C28,C3:D22,G3:J22,N3:O22,S3:S22,V3:W22").Select
Selection.Font.ColorIndex = 51
Range("C3").Select
Set mySource = Worksheets("発注先")
Set myRange = Range("C3:C22,G3:G22,N3:N22,S3:S22,V3:V22")
k = 0
For Each c In myRange
With c
k = k + 1
s1 = mySource.Cells(7 + k, 2).Value
s2 = mySource.Cells(7 + k, 10).Value
.Value = StrConv(LeftB(StrConv(s1, vbFromUnicode), 6), vbUnicode) & " " & s2
i = InStr(.Text, " ")
If i Then
.Characters(i).Font.Color = vbBlue
End If
End With
Next
Call 保護8
End Sub
|
|