sort for variables
Another possible error would be using code to do this when you could use the
builtin Conditional Formatting feature under the Format menu. Regards, Tom Ogilvy "Bob" wrote in message ... Having trouble coding a procedure to look at two values in each row of a set of data, coloumns (J) and (K). Based on these values I want to colour the row one colour if the values are both below zero and another if they are not. Can anyone explain where I'm going wrong? Below is what i've been trying. Thanks, Bob Private Sub CommandButton3_Click() For i = 1 To 30 If Range("Ji") < 0 And ("Ki") < 0 Then Range("Ji:Ii").Select Selection.Font.ColorIndex = 3 Else Range("Ji:Ii").Select Selection.Font.ColourIndex = 4 End If Next i End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 06:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com