If rng.Value = Val1 & Interior.ColorIndex = 36 Then
how do I get there
--
Jim at Eagle
If rng.Value = Val1 & Interior.ColorIndex = 36 Then
how do I get there
--
Jim at Eagle
I don't understand your question. What does it have to do with
looping? Your syntax is wrong. Use "And" not "&".
If rng.Value = Val1 And rng.Interior.ColorIndex = 36 Then
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Jim at Eagle" <[email protected]> wrote in
message
news:[email protected]...
> If rng.Value = Val1 & Interior.ColorIndex = 36 Then
>
> how do I get there
> --
> Jim at Eagle
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks