|Two items that are still not clear:|
1 - You didn't supply any Column letters or Row numbers, so the code below assumes that the table you posted begins in A1.
2 - In your original post you said "... at the end of it there can be a No or a Yes". In your example data, the strings used are "no" and "yes". In VBA "No" and "no" are not the same thing, "Yes" and "yes" are not the same thing. The code below was written to accept any combination of upper and lower case strings.
Dim lastRw, lastCol As Long
'Determine last Row with data in Column A
lastRw = Cells(Rows.Count, "A").End(xlUp).Row
'Loop through rows
For srcRw = 2 To lastRw
'Determine last Column in current Row
lastCol = Cells(srcRw, Columns.Count).End(xlToLeft).Column
'If the last Column = "Yes" or "yes" then highlight
'the current Row and the Row above with Yellow
If UCase(Cells(srcRw, lastCol)) = UCase("Yes") Then
Range(Cells(srcRw - 1, "A"), Cells(srcRw, lastCol)).Interior.ColorIndex = 6
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.