Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Alternating row colors in Excel file (Tip)

4 REPLIES 4
Reply
Message 1 of 5
doni49
415 Views, 4 Replies

Alternating row colors in Excel file (Tip)

I realize this isn't an Acad issue.  But over the twenty years that I've been doing CAD, I've used Excel for a LOT of my CAD work.  During that time, I've on MANY occasions needed to shade every other row (to make it easier to read a list of points for example).  But I've never found a way to do this other than picking every other row and changing the fill color.

 

I had an epiphany yesterday and figured out how to do it and thought I'd share in case anyone else needs to do similar.

 

It requires "Condtional Formatting" and combining two formula functions.  After you click "New Rule", click "Use a Forumla......" at the bottom of the list.

 

Then use the following formula (make note of the dollar sign -- and only the one).  This works because the ROW function tells you the row number of the specified cell.  By not putting a dollar sign before the 1, it will change to A2 when it's on row 2 and A3 when on row 3 etc.  The MOD function will divide the first number (which is the row number) by the second number and return the REMAINDER.  So if you divide the row number by 2 and the remainder is 0 then the row number is an even number.  If the remainder (return value from the mod function) is greater than zero), then the row number is ODD.

 

I've attached an example xls file.

 

=mod(row($a1),2)=0

 

ExcelConditionalFormatting.png

 

AlternatingRowShading.png

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

4 REPLIES 4
Message 2 of 5
Joe-Bouza
in reply to: doni49

Thanks. You may also be interested in "format as Table" that option has some added benifits

 

Thank you

Joseph D. Bouza, P.E. (one of 'THOSE' People)

HP Z210 Workstation
Intel Xeon CPU E31240 @ 3.30 Hz
12 GB Ram


Note: Its all Resistentialism, so keep calm and carry on

64 Bit Win10 OS
Message 3 of 5
doni49
in reply to: Joe-Bouza

Thanks Joe.  That looks like another good option.  Cool!



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 4 of 5
KMercier_C3D
in reply to: doni49

I've always found it quicker to just define two of the rows as I want them and select them both, then click the paintbrush "Format Painter" to copy the formatting and then selecting all the rest of the cells that I want to be alternating. Quick. Easy.



Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

Message 5 of 5
KMercier_C3D
in reply to: doni49

I've always just done two rows worth and then used the paintbrush to copy the formatting all the way down.


Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report