Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
cjjoo
 
Posts: n/a
Default grouping and give colours


i have a worksheet and teh driver s will key in these information:

date vehicle no km_start km_end distance travelled


at the end of the month, i will do a SORT starting with the vehicle
num. So all the

same vehicle no will be grouped together . Now , i was thinking if it
is possible

to give a alternate colour at each change of the vehicle no.? Can
conditional

formatting help to solve this problem?


--
cjjoo
------------------------------------------------------------------------
cjjoo's Profile: http://www.excelforum.com/member.php...o&userid=26916
View this thread: http://www.excelforum.com/showthread...hreadid=474681

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Indeed you can

Select all the cells from row 2 on
FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =$B2<$B1
Select format
Select Pattern tab
Choose a colour
OK

--
HTH

Bob Phillips

"cjjoo" wrote in
message ...

i have a worksheet and teh driver s will key in these information:

date vehicle no km_start km_end distance travelled


at the end of the month, i will do a SORT starting with the vehicle
num. So all the

same vehicle no will be grouped together . Now , i was thinking if it
is possible

to give a alternate colour at each change of the vehicle no.? Can
conditional

formatting help to solve this problem?


--
cjjoo
------------------------------------------------------------------------
cjjoo's Profile:

http://www.excelforum.com/member.php...o&userid=26916
View this thread: http://www.excelforum.com/showthread...hreadid=474681



  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Bob and cjjoo,
I think the poster (cjjoo) would want those of the same driver together to be
of the same color, rather than just a border. see
Color Grouping with alternating colors (#grouping)
http://www.mvps.org/dmcritchie/excel...t.htm#grouping

I tried to tell someone your method was almost as good at identifying
changes -- they didn't buy it.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Bob Phillips" wrote in message ...
Indeed you can

Select all the cells from row 2 on
FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =$B2<$B1
Select format
Select Pattern tab
Choose a colour
OK

--
HTH

Bob Phillips

"cjjoo" wrote in
message ...

i have a worksheet and teh driver s will key in these information:

date vehicle no km_start km_end distance travelled


at the end of the month, i will do a SORT starting with the vehicle
num. So all the

same vehicle no will be grouped together . Now , i was thinking if it
is possible

to give a alternate colour at each change of the vehicle no.? Can
conditional

formatting help to solve this problem?


--
cjjoo
------------------------------------------------------------------------
cjjoo's Profile:

http://www.excelforum.com/member.php...o&userid=26916
View this thread: http://www.excelforum.com/showthread...hreadid=474681





  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

I see what you mean on re-reading. Seems as good to me <g

Regards

Bob

"David McRitchie" wrote in message
...
Hi Bob and cjjoo,
I think the poster (cjjoo) would want those of the same driver together to

be
of the same color, rather than just a border. see
Color Grouping with alternating colors (#grouping)
http://www.mvps.org/dmcritchie/excel...t.htm#grouping

I tried to tell someone your method was almost as good at identifying
changes -- they didn't buy it.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Bob Phillips" wrote in message

...
Indeed you can

Select all the cells from row 2 on
FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =$B2<$B1
Select format
Select Pattern tab
Choose a colour
OK

--
HTH

Bob Phillips

"cjjoo" wrote in
message ...

i have a worksheet and teh driver s will key in these information:

date vehicle no km_start km_end distance travelled


at the end of the month, i will do a SORT starting with the vehicle
num. So all the

same vehicle no will be grouped together . Now , i was thinking if it
is possible

to give a alternate colour at each change of the vehicle no.? Can
conditional

formatting help to solve this problem?


--
cjjoo


------------------------------------------------------------------------
cjjoo's Profile:

http://www.excelforum.com/member.php...o&userid=26916
View this thread:

http://www.excelforum.com/showthread...hreadid=474681







  #5   Report Post  
cjjoo
 
Posts: n/a
Default


sorry guys , the results are good but it is possible that the same
vehicle num be given one colour instead of the last vehicle no?


--
cjjoo
------------------------------------------------------------------------
cjjoo's Profile: http://www.excelforum.com/member.php...o&userid=26916
View this thread: http://www.excelforum.com/showthread...hreadid=474681



  #6   Report Post  
David McRitchie
 
Posts: n/a
Default

Did you read the first part of my web page and then the section I mentioned;
Color Grouping with alternating colors (#grouping)
http://www.mvps.org/dmcritchie/excel...t.htm#grouping

Are you entries sorted, because it is dependent upon order to color band
like vehicles. You want the example at the top of the section in yellow.
Did you create the helper column -- which should show either 0 or 1?

Column E is a helper column, not previously existing and is required as part of C.F. test
and has a formula
The Conditional Formatting formula check if the value in E is 0 or 1

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"cjjoo" wrote in message
...

sorry guys , the results are good but it is possible that the same
vehicle num be given one colour instead of the last vehicle no?


--
cjjoo
------------------------------------------------------------------------
cjjoo's Profile: http://www.excelforum.com/member.php...o&userid=26916
View this thread: http://www.excelforum.com/showthread...hreadid=474681



  #7   Report Post  
David McRitchie
 
Posts: n/a
Default

I redid the second part of the section, as it might have added to confusion
because you want the initial help column entry and formula and the
first conditional formatting formula show.

If you only care about one column, you can eliminate the test for
both columns A & B so instead of

=MOD(OFFSET($E2,-1,0)+ OR($A2<OFFSET($A2,-1,0), $B2<OFFSET($B2,-1,0)),2)

You might use
=MOD(OFFSET($E2,-1,0)+ ($A2<OFFSET($A2,-1,0)) ,2)



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
Grouping ranges J Charts and Charting in Excel 1 May 13th 05 11:40 PM
grouping data in a pivot table William Excel Discussion (Misc queries) 2 April 6th 05 09:16 PM
Custom Grouping on Pivot Table Edgar Thoemmes Excel Worksheet Functions 2 November 19th 04 05:41 PM


All times are GMT +1. The time now is 08:29 AM.

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

About Us

"It's about Microsoft Excel"