#1   Report Post  
mcnenny
 
Posts: n/a
Default Shading problem


I need help with this...please!

Easiest way to explain this is...I have 40,000 lines of data that I
need to look at. To make the data more readable for review, I want to
seperate unique accounts with shading (i.e. records for account 1 are
not shaded, records for account 2 are shaded, records for account 3 are
not shaded,............etc).

Please see attached excel file. Sheet 1 is raw data. Sheet 2 is the
desired result.

I am thinking I can create a macro or use some type of conditional
formatting to create the desired result.

Thanks in advance for any comments.


+-------------------------------------------------------------------+
|Filename: shading_example.ZIP |
|Download: http://www.excelforum.com/attachment.php?postid=3699 |
+-------------------------------------------------------------------+

--
mcnenny
------------------------------------------------------------------------
mcnenny's Profile: http://www.excelforum.com/member.php...o&userid=26383
View this thread: http://www.excelforum.com/showthread...hreadid=396619

  #2   Report Post  
bigwheel
 
Posts: n/a
Default

Try something like this. You can pick your own colors by changing the
ColorIndex or RGB values:-

Sub colorcode()
For nrow = 2 To 40000
If Cells(nrow, 2) = "G52-555222" Then
Range(Cells(nrow, 1), Cells(nrow, 7)).Interior.ColorIndex = 8
ElseIf Cells(nrow, 2) = "W5H-222999" Then
Range(Cells(nrow, 1), Cells(nrow, 7)).Interior.Color = RGB(255,
255, 192)
ElseIf Cells(nrow, 2) = "M52-999222" Then
Range(Cells(nrow, 1), Cells(nrow, 7)).Interior.Color = RGB(204,
255, 204)
Else
Range(Cells(nrow, 1), Cells(nrow, 7)).Interior.Color = RGB(255,
255, 255)
End If
Next
Range("a1").Select
End Sub

"mcnenny" wrote:


I need help with this...please!

Easiest way to explain this is...I have 40,000 lines of data that I
need to look at. To make the data more readable for review, I want to
seperate unique accounts with shading (i.e. records for account 1 are
not shaded, records for account 2 are shaded, records for account 3 are
not shaded,............etc).

Please see attached excel file. Sheet 1 is raw data. Sheet 2 is the
desired result.

I am thinking I can create a macro or use some type of conditional
formatting to create the desired result.

Thanks in advance for any comments.


+-------------------------------------------------------------------+
|Filename: shading_example.ZIP |
|Download: http://www.excelforum.com/attachment.php?postid=3699 |
+-------------------------------------------------------------------+

--
mcnenny
------------------------------------------------------------------------
mcnenny's Profile: http://www.excelforum.com/member.php...o&userid=26383
View this thread: http://www.excelforum.com/showthread...hreadid=396619


  #4   Report Post  
mcnenny
 
Posts: n/a
Default


Perfect solution. This is exactly what I was looking for. Saves me a
tremendous amount of work!!! Thanks for the tip.


--
mcnenny
------------------------------------------------------------------------
mcnenny's Profile: http://www.excelforum.com/member.php...o&userid=26383
View this thread: http://www.excelforum.com/showthread...hreadid=396619

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
Conditional Cell Shading (based on the shading of other cells) Tubby Excel Worksheet Functions 2 June 20th 06 10:03 PM
Cell shading problem greg7468 Excel Discussion (Misc queries) 4 June 22nd 05 02:04 PM
change cell shading whenever contents different from previous cell zooeyhallne Excel Discussion (Misc queries) 3 June 6th 05 09:59 PM
conditional cell shading when a change occurs zooeyhall Excel Discussion (Misc queries) 1 June 6th 05 05:14 PM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM


All times are GMT +1. The time now is 07:40 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"