View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim at Eagle Jim at Eagle is offline
external usenet poster
 
Posts: 83
Default Loop criteria based on cell value and color

Sorry, here is what I'm trying to do. With named range selected
the code I used, If rng.Value = Val1 Then
when the program finds a value that equals Val1 then it takes the value of
the cell offset by one column and adds it to a variable and accumulates a
total value based on Val1 and then places that total value in a new location.
I can nest another IF statement for additional criteria but would prefer to
use something like this,
If rng.Value = Val1 And rng.Interior.ColorIndex = 36 Then
The use of and is the question