Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default IF: color of cell color next row

I've got an Excel sheet that I'm trying to make more readable by sorting/grouping numbers in column 2, and
making one grouping of rows/column 2 numbers with no fill color (Interior.ColorIndex = x1none). When
the number in Column 2 changes, I want to go from "no color" to Interior.ColorIndex = 35

What I need to know is how to look at the color of a cell in row 1 and determine if the corresponding cell in
row 2 is different. And if it is different, then row 2 gets Interior.ColorIndex = 35. Below is what I've tried s
far that doesn't work. Many thanks, John

If Cells(rowctr, 2) < Cells(rowctr + 1, 2) The
Range("A" & rowctr).Selec
If ActiveCell.Interior.ColorIndex = x1none The
Range("A" & rowctr + 1, "L" & rowctr + 1).Selec
With Selection.Interio
.ColorIndex = 3
End Wit
End I

If Selection.Interior.ColorIndex = 35 The
Range("A" & rowctr + 1).Selec
With Selection.Interio
.ColorIndex = x1non
End Wit
End I
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default IF: color of cell color next row


If Cells(rowctr, 2).Interior.ColorIndex < Cells(rowctr + 1
2).Interior.ColorIndex Then
Cells(rowctr + 1, 2).Interior.ColorIndex = 35
End I

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
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
Can't format cell color/text color in Office Excel 2003 in fil Tony S Excel Discussion (Misc queries) 1 December 21st 07 01:41 PM
Make text color match cell color with macro? JoeSpareBedroom Excel Discussion (Misc queries) 1 June 26th 07 07:09 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
Default Border, Font Color, and Cell Background Color Elijah Excel Discussion (Misc queries) 1 October 28th 05 04:10 PM


All times are GMT +1. The time now is 09:49 PM.

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"