Should it be?
If Range("R2").Value = 0 Then
Range("A288:A334").Interior.ColorIndex = 4
End If
If Range("Q2").Value = 0 Then
Range("A240:A287")..Interior.ColorIndex = 14
End If
If Range("P2").Value = 0 Then
Range("A192:A239")..Interior.ColorIndex = 39
End If
--
HTH
Bob Phillips
"Paige" <Paige.1s4gqf_1121281519.7031@excelforum-nospam.com> wrote in
message news:Paige.1s4gqf_1121281519.7031@excelforum-nospam.com...
>
> Hello, I am trying to do some IF statements within a larger macro.
> What I want to do is delete certain sections of a worksheet depending
> on whether they have quantities in them or not. I got an IF statement
> to work, but it carried what it needed to do if it was true whether it
> was true or false. Right now I have it set up to just change the
> background color until I know for sure it works because it helps me
> keep track of what is working & not working while I am building the
> macros. Below is an example of the IF statments that I can't get to
> work the way I want. This is my first attempt at them so they may be
> completely wrong.
>
> If R2 = 0 Then
> Range("A288:A334").Select
> Selection.Interior.ColorIndex = 4
> End If
>
> If Q2 = 0 Then
> Range("A240:A287").Select
> Selection.Interior.ColorIndex = 14
> End If
>
> If P2 = 0 Then
> Range("A192:A239").Select
> Selection.Interior.ColorIndex = 39
> End If
>
> Thanks for any help!
>
>
> --
> Paige
> ------------------------------------------------------------------------
> Paige's Profile:
http://www.excelforum.com/member.php...o&userid=23096
> View this thread: http://www.excelforum.com/showthread...hreadid=386913
>
Bookmarks