を使用して重複した値に色を私は私はいくつかを達成したが、Gでのステータスが列=準備ができた場合は、まだ私はは、列の範囲から値を分割し、VBマクロ
- いくつかの助けを必要としているのbolow要件を持っていますすべての値は、列Cである場合は再テスト又は
- を通過するそして、テイク/列Cに重複IDを分割する(、)カンマで区切ら
- 列Aの重複IDを検索し、グリーン色で それをマーク
[![例データ] [1]] [1]
ex。欠陥ID CMS-921の行1に2つのID 44と163693が重複しているので、列Aの値を調べる必要があります。
- これらの欠陥(44および163693は、i)グリーン色で私の現在のコードの
例行全体をマークする必要があり、次いで閉じていない:
Sub findduplicateColorIt()
Get the last row
Dim Report As Worksheet
Dim i As Integer, j As Integer
Dim lastRow As Integer
Set Report = Excel.Worksheets("Sheet2")
lastRow = Report.UsedRange.Rows.Count
Application.ScreenUpdating = False
For i = 2 To lastRow
For j = 2 To lastRow
If Report.Cells(i, 4).Value <> ""_
And Report.Cells(i, 7).Value = "Ready to retest"_
And Report.Cells(i, 1).Value = "Jira" Then
'This will omit blank cells at the end
'(in the event that the column lengths are not equal).
If InStr(1, Report.Cells(j, 2).Value, Report.Cells(i, 3).Value, vbTextCompare) > 0 Then
' need to get a logic where i need to get value from Colum D,
'split it and find the value in column A and color the row with green/any.
a = Split(ActiveCell.Value, ",")
For Text = 0 To UBound(a)
MsgBox a(Text)
Next Text
Exit For
Else
End If
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub
正確に何か問題がありますか? (重複を見つける、値を分割する、forループが機能しないなど) –
何もしていない 'Else'があるようです。 –
@CodyG。今、配列のA =分割(ActiveCell.Value、 "、")は複数の値を持つ、今私は(i)から個々の値を取る必要がありますし、列Bで検索し、行全体を着色..私は得ることができませんその論理... – Venkat