Private Sub CommandButton1_Click()
Dim i As Long
i = Range("D" & Rows.Count).End(xlUp).Row
For Each rngCell In Range("D2:D" & i)
If Range("D2:D").value = "" Then
Else
If Range (“D2:D”) “Template” = Range(“D2:D”) “Source” Then
(“A2:A”),(“B2:B”),(“C2:C”),(“D2:D”),(“E2:E”),(“F2:F”),(“G2:G”),(“H2:H”),(“I2:I”), “Low Coverage”
If Range (“D2:D”) “Template” = Range(“D2:D”) “” AND(“J2:J”) = “Y” in “Source” Then
Range (“J2:J”) in “Low Coverage”
.Interior.Color = RGB(255, 0, 255) 'Pink
Else
If Range (“D2:D”) “Template” = Range(“D2:D”) “Source “ AND(“J2:J”) = “N” in “Source” Then
Range (“J2:J”) in Low Coverage
.Interior.Color = RGB(53, 153, 102) 'Green
Else
If Range (“D2:D”) “Template” = Range(“D2:D”) “Source “ AND(“J2:J”) = “” in “Source” Then
Range (“J2:J”) in Low Coverage
.Interior.Color = RGB(255,255, 0) 'Yellow
.Value = “?”
Next rngCell
End Sub
Above is my attempt to accomplish this when the user clicks compare amplicons:
STEP 1: Match column D in Template with column D in Source if it is highlighted Red.
STEP 2: If there is a match then to the Low Coverage worksheet all the information in columns A,B,C,D,E,F,G,H,I,J
STEP 3: Match column D in Template with column D in Source AND If in Column J there is a Y then column J in Low Coverage is Pink, if in Column J there is a N then column J in Low Coverage is Y Green, if in Column J is “” then column J in Low Coverage is Yellow with a ? in it
I'm sure it is not right, any assistance would be appreciated. I attached the spreadsheet as well. Thank you.
Bookmarks