Share via

Automatic Alternating Row Color

Anonymous
2012-03-12T12:44:48+00:00

I've been trying to apply a conditional format to my spreadsheet for alternating row color. Several people online say that using the formula, "=mod(row(),2)=1" will work, but it's not working for me. Does anyone know how to do this in Excel in Office 2011 for Mac?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

16 answers

Sort by: Most helpful
  1. Anonymous
    2013-06-13T21:07:47+00:00

    Here you go : =mod(row();2)=0

    20+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-03-25T13:02:19+00:00

    I used to have this same problem and I know it's not because Philip did somehting wrong, it's because there is a difference between certain European settings versus American/English settings. Something to do with the comma I think. Because in seom European countries, the comma is used differently. For example in the Netherlands 1.000,00 is one thousand instead of 1,000.00 

    I hadn't worked on a Dutch computer in a while and now I cannot remember for the life of me with what you had to replace the comma with in the formula =mod(row(),2)=1. Exel tells me there is something wrong in the formula.

    Anyway, I'll keep googling.

    7 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2012-03-12T16:00:22+00:00

    Select the rows you want to format (or the entire sheet).  In the CF dialog, choose Use a formula to determine which cells to format. In the formula box, enter

    =MOD(ROW(), 2) = 1

    for odd rows or

    =MOD(ROW(), 2) = 0

    for even rows. Click Format, and choose the appropriate Fill color. Click OK, then OK to accept the CF.

    And yes, you can use

    =MOD(COLUMN(), 2) = 1

    to CF columns.

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2012-03-12T23:29:57+00:00

    I went to conditional Formatting I clicked on plus sign start a rule.

    a window came up I choose entire worksheet.

    then Choose Formula I type the first formula  in the fiirst box and chose my color a pale yellow

    In the second box for the second I first tried no formula I chose white for color.

    The second time around I tried both formulas.

    both times after clicking Okay to save rule and close the window. Nothing no alternating color at all

    I do notice when I choose a Color it changes to shading one side pale yellow one side white appears to  to mean changes to gradient that goes from yellow to white.

    I even copied and pasted the formulas exactly as you have them written. Might be the same issue that the original OP has.

    See this:http://www.screencast.com/t/YjbgfaIOQ

    And this: http://www.screencast.com/t/6eozqM8yj0

    I've typed as:

    =MOD(ROW(), 2=1  =MOD(ROW(), 2 = 1  =MOD(ROW), 2 = 1

    =MOD(ROW(), 2=0  =MOD(ROW(), 2 = 0  =MOD(ROW), 2 = 0 still get message

    Enter valid formula

    2 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2012-03-12T14:07:40+00:00

    J.E,

    I am going to ask a very dumb question related to this. (Maybe two or three). I am possibly interested in doing this myself and always have done so manually.

    1. How do you apply such, through the conditional Format command?
    2. And how does one choose colors?
    3. can this same formula work for columns by substituting the word "column" in place of the word "row".

    I also have a need on occasion to do that as well. I would create several Templates based on this when needed. 2 for rows, 2 for columns (one each for Landscape and Portrait)

    I too have just tried out and there is nowhere to Place the Formula

    I know you don't like video's But I just have put this one up: http://www.screencast.com/t/nUHQkAGRzGIv

    http://www.screencast.com/t/cL0bNvWjUk

    2 people found this answer helpful.
    0 comments No comments