Shading problem

  • Thread starter Thread starter mcnenny
  • Start date Start date
M

mcnenny

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 |
+-------------------------------------------------------------------+
 
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,

My Excel add-in "Shade Data Rows" does that.
It will shade groups of like valued rows or will shade by every nth row.
Choice of shade colors and an option to skip hidden rows.
Comes with a one page Word.doc install/use file.
It is free upon direct request. Remove XXX from my email address.
Jim Cone
San Francisco, USA
(e-mail address removed)



"mcnenny"

<[email protected]>

wrote in message

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.
 
Perfect solution. This is exactly what I was looking for. Saves me a
tremendous amount of work!!! Thanks for the tip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top