Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple variables to sort and sum, return values<0 with sum refer Stinky Excel Worksheet Functions 5 April 20th 10 04:18 PM
Sort by two variables at the same time MS[_3_] Excel Worksheet Functions 7 October 21st 08 03:35 AM
How do I sort variables into sets of three? mikeb Excel Discussion (Misc queries) 2 June 21st 06 12:46 AM
How do I sort a column of computed variables in EXCEL? Sylgeox Excel Worksheet Functions 2 October 3rd 05 12:07 AM
Sort with two variables Jeff New Users to Excel 2 June 30th 05 06:14 AM


All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"