Solved

Color alternate excel rows based on duplicate numbering system.

Posted on 2013-01-29
2
435 Views
Last Modified: 2013-01-29
Hello Experts.

I have a Excel 2003 spreadsheet.  In Column A I have the numbering system below which will go beyond 150 by the end of the year.  I would like to use something like conditional formatting so each new number sequence is an alternate color (grey/white) across to Column AO. (Color in bracket for emphasis only)


1_2013 (white)
2_2013 (Grey)
2_2013 (Grey)
2_2013 (Grey)
2_2013 (Grey)
3_2013 (White)
4_2013 (Grey)
5_2013 (White)
6_2013 (Grey)
7_2013 (White)
7_2013 (White)
8_2013 (Grey)

etc, etc, etc

As soon as the number is entered, it colors that row to the alternate color to Column AO

Thank you in advance.

Matt
0
Comment
Question by:mattm2002
2 Comments
 
LVL 7

Accepted Solution

by:
Beneford earned 500 total points
Comment Utility
Is it easy to extract a sequential number from column AO?
eg left(AO1,find("_",AO1)-1)

If so, you can use an even/odd formula in your conditional formatting.

I don't have Excel 2003, but in 2010, I can use the following formulae and have the two formulae covering the same range giving alternate colours as you specified.

=MOD(LEFT($A01,FIND("_",$A01)-1),2)=0
=MOD(LEFT($A01,FIND("_",$A01)-1),2)=1

If it's not easy to get a sequential number, then you could introduce a hidden column that checks AO34 against AO33 as follows:

=IF(A03=A02,B02,IF(B02="White","Grey","White"))

And then use column BO to determine the colour you want.
0
 

Author Comment

by:mattm2002
Comment Utility
Thanks Beneford

I added your sequential suggestion to AP (given AO has data in it)

I did some more research based on your suggestion and found the following worked for 2003, coloring based on an even or odd number.

=AND(MOD($AP2,2)=0,$AP2<>"")
=AND(MOD($AP2,2)=1,$AP2<>"")

Worked like a charm, much appreciated.

Matt
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This collection of functions covers all the normal rounding methods of just about any numeric value.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now