I am still a nubi at VB and I am probably getting in over my head but, I think that you can help me figure this one out.

I have two ranges one is named “GL” the other “Stmt.” I need to compare each cell value of range “GL” to each cell value of range “Stmnt.” Below is a sorry example of what I am trying to do. As you can see range “GL” can vary in length and each cell can be compared to the cells in range “Stmt,” but at the moment I have to write out each cell in range “Stmt,” therefore in my code range “Stmnt” cannot very in length.” How can I compare each value in range “GL” to each value in range “Stmnt” when both vary in length? I do not have a problem selecting and naming the ranges when they vary only comparing the values.

VB Code:
  1. Sub Macro1()
  2.     Range("a1:a15").Select
  3.     Selection.Name = "GL"
  4.     Range("b1:b10").Select
  5.     Selection.Name = "Stmt"
  6.    
  7.     For Each cell In Range("GL")
  8.         If cell.Value = Range("b1") Then
  9.         cell.Interior.ColorIndex = 37
  10.         Range("b1").Interior.ColorIndex = 36
  11.         End If
  12.         If cell.Value = Range("b2") Then
  13.         cell.Interior.ColorIndex = 37
  14.         Range("b2").Interior.ColorIndex = 36
  15.         End If
  16.         If cell.Value = Range("b3") Then
  17.         cell.Interior.ColorIndex = 37
  18.         Range("b3").Interior.ColorIndex = 36
  19.         End If
  20.         If cell.Value = Range("b4") Then
  21.         cell.Interior.ColorIndex = 37
  22.         Range("b4").Interior.ColorIndex = 36
  23.         End If
  24.         If cell.Value = Range("b5") Then
  25.         cell.Interior.ColorIndex = 37
  26.         Range("b5").Interior.ColorIndex = 36
  27.         End If
  28.         If cell.Value = Range("b6") Then
  29.         cell.Interior.ColorIndex = 37
  30.         Range("b6").Interior.ColorIndex = 36
  31.         End If
  32.         If cell.Value = Range("b7") Then
  33.         cell.Interior.ColorIndex = 37
  34.         Range("b7").Interior.ColorIndex = 36
  35.         End If
  36.         If cell.Value = Range("b8") Then
  37.         cell.Interior.ColorIndex = 37
  38.         Range("b8").Interior.ColorIndex = 36
  39.         End If
  40.         If cell.Value = Range("b9") Then
  41.         cell.Interior.ColorIndex = 37
  42.         Range("b9").Interior.ColorIndex = 36
  43.         End If
  44.         If cell.Value = Range("b10") Then
  45.         cell.Interior.ColorIndex = 37
  46.         Range("b10").Interior.ColorIndex = 36
  47.         End If
  48.     Next cell
  49. End Sub