fin = Sheets(2).Range("C65536").End(xlUp).Row
For a99005 = 6 To fin
Sheets(1).Range("a1").Select
If Sheets(2).Cells(a99005, 3) = "99005" Then
Set SKU = Sheets(1).Columns(1).Find(Sheets(2).Cells(a99005, 2), LookIn:=xlValues, LookAt:=xlWhole)
'-------------battery_type = null
If Sheets(2).Cells(a99005, 5).Value Like "*battery_type = null*" Then
Sheets(2).Cells(a99005, 3).Interior.Color = 10025880 'vert
Set Column = Sheets(1).Rows(2).Find("battery_type", LookIn:=xlValues, LookAt:=xlWhole)
If Not Column Is Nothing Then
Sheets(1).Cells(SKU.Row, Column.Column).Interior.Color = 52428
End If
Else
'if key words canot be found in page 2
Sheets(2).Cells(a99005, 3).Interior.Color = 255
End If
'-------------ShippingWeightUnitOfMeasure
If Sheets(2).Cells(a99005, 5).Value Like "*ShippingWeightUnitOfMeasure = null*" Or Sheets(2).Cells(a99005, 5).Value Like "*Unité de mesure du poids du paquet = null*" Then
Sheets(2).Cells(a99005, 3).Interior.Color = 10025880 'vert
Set Column = Sheets(1).Rows(2).Find("ShippingWeightUnitOfMeasure", LookIn:=xlValues, LookAt:=xlWhole)
If Not Column Is Nothing Then
Sheets(1).Cells(SKU.Row, Column.Column).Interior.Color = 52428
End If
End If
Set Column = Sheets(1).Rows(2).Find("Unité de mesure du poids du paquet", LookIn:=xlValues, LookAt:=xlWhole)
If Not Column Is Nothing Then
Sheets(1).Cells(SKU.Row, Column.Column).Interior.Color = 52428
If Not Sheets(1).Cells(SKU.Row, Column.Column).Comment Is Nothing Then
Sheets(1).Cells(SKU.Row, Column.Column).Comment.Text Text:="Unité de mesure du poids du paquet has to be populated"
Else
Sheets(1).Cells(SKU.Row, Column.Column).AddComment
Sheets(1).Cells(SKU.Row, Column.Column).Comment.Visible = True
Sheets(1).Cells(SKU.Row, Column.Column).Comment.Text Text:="Unité de mesure du poids du paquet has to be populated"
End If
End If
Else
If Sheets(2).Cells(a99005, 3).Interior.Color = 10025880 Then
Else
Sheets(2).Cells(a99005, 3).Interior.Color = 255
End If
End If
End If
Next