A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

change cell shading whenever contents different from previous cell



 
 
Thread Tools Display Modes
  #1  
Old June 6th, 2005, 09:27 PM
zooeyhallne
external usenet poster
 
Posts: n/a
Default change cell shading whenever contents different from previous cell

Hi! I am generally familiar with Excel, but need some help on this
particular problem.

I want to apply a format whe whenever the number in a column differs
from the one previous to it, a cell shading color change is applied.

For example, you have a column of numbers in Excel:

2
2
2
5 (cell shading color change applied)
5
5
5
2 (cell shading color change applied)
2
2
3 (cell shading color change applied)
etc....

It doesn't matter what color is used, just so that it is applied whenever
there is a change from the previous number.

There has got to be an easy answer to this.... thanks so much in advance for
any help!
  #2  
Old June 6th, 2005, 09:49 PM
Earl Kiosterud
external usenet poster
 
Posts: n/a
Default

Zooey,

Easy answer? Pretty much, and you'll get a mess of them -- I don't know why
I'm throwing in, but here goes.

You'll have to select the column (or portion thereof), and the active
(white) cell must not be in row 1 (well, it could be, but it's confusing).
Press Enter to move it down after you've made your selection. I'll presume
A2 is active.

Format - Conditional format - Formula is: = A2A1
Set your format, and OK your way out of the whole thing.

The formula will be copied into the conditional formatting of the other
(selected) cells. A1, if in the selection, will have something like
=A1A65536, indicating that it wraps.

If you want the row to be highlighted (not just the cell in the column),
it's all the same, except you select the rows, not just the column of
interest.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"zooeyhallne" wrote in message
...
Hi! I am generally familiar with Excel, but need some help on this
particular problem.

I want to apply a format whe whenever the number in a column differs
from the one previous to it, a cell shading color change is applied.

For example, you have a column of numbers in Excel:

2
2
2
5 (cell shading color change applied)
5
5
5
2 (cell shading color change applied)
2
2
3 (cell shading color change applied)
etc....

It doesn't matter what color is used, just so that it is applied whenever
there is a change from the previous number.

There has got to be an easy answer to this.... thanks so much in advance
for
any help!



  #3  
Old June 6th, 2005, 09:52 PM
ynissel
external usenet poster
 
Posts: n/a
Default

You can try conditional formatting under format conditional formannting -
and say if this cell is not equal to the previous cell.
Good luck.
"zooeyhallne" wrote in message
...
Hi! I am generally familiar with Excel, but need some help on this
particular problem.

I want to apply a format whe whenever the number in a column differs
from the one previous to it, a cell shading color change is applied.

For example, you have a column of numbers in Excel:

2
2
2
5 (cell shading color change applied)
5
5
5
2 (cell shading color change applied)
2
2
3 (cell shading color change applied)
etc....

It doesn't matter what color is used, just so that it is applied whenever
there is a change from the previous number.

There has got to be an easy answer to this.... thanks so much in advance
for
any help!



  #4  
Old June 6th, 2005, 09:59 PM
bigwheel
external usenet poster
 
Posts: n/a
Default

Another way uses a bit of VBA. Not to neat but it does the trick. I expect
someone will come up with a more concise solution;

For a = 2 To 20 'or whatever the range is
If Cells(a, 1) Cells(a, 1).Offset(-1, 0) Or Cells(a, 1) Cells(a,
1).Offset(-1, 0) Then
Cells(a, 1).Interior.ColorIndex = 6
End If
Next


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
word table cell resize or word table cell size change or word table change cell size [email protected] Tables 0 January 13th, 2005 09:55 PM
How can I change a cell value based on another cells color? JeremyVIS General Discussion 2 September 8th, 2004 04:16 AM
Column E cell contents added into Column D contents (not overwriting data but mixing) creativetechguy General Discussion 2 August 5th, 2004 07:32 PM


All times are GMT +1. The time now is 04:28 PM.


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