+ Reply to Thread
Results 1 to 7 of 7

Alternate Row Shading - conditional formula not working

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    14

    Unhappy Alternate Row Shading - conditional formula not working

    Hi,

    I have been trying make my Excel 2007 shade every odd row in a specific column. I have tried about a dozen different websites, among them the following:

    http://spreadsheetpage.com/index.php...al_formatting/
    http://office.microsoft.com/en-au/ex...010251644.aspx

    I have done everything exactly as shown there – it didn't work. Excell either informs me that the formula is invalid or it applies it... but nothing changes. What I would like to do is to select a column and use a conditional formula to shade every other row in that column.

    I have tried this one:
    =MOD(ROW(),2)=0

    it was invalid until I changed it to get the following:
    ="MOD(ROW(),2)=0"

    I have tried slightly different versions, too. I have tried to use MS support in Polish (my Excel is in that language), however it's automatically translated, including the coding. English one was of no practical use nor have i been able to google this error. I do not want to use Format as Table function.

    Help, please?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697

    Re: Alternate Row Shading - conditional formula not working

    I assume your default separator is a semi-colon not a comma, so try this version (no quotes)

    =MOD(ROW();2)=0
    Audere est facere

  3. #3
    Registered User
    Join Date
    12-07-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Alternate Row Shading - conditional formula not working

    Thanks for your prompt reply. It did accept this format of formula, but to no end, i.e. the formula is there, but it didn't change the selected cells (or any other for that matter) at all. I did select the cells I wanted to shade, chose Conditional Formatting, then chose New Formula -> use to choose cells to format, put it exactly as you wrote. Here's a screen:
    notworking.png

  4. #4
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: Alternate Row Shading - conditional formula not working

    Try again this time without the "=0" at the end; something like this =MOD(ROW(),2)

    Note: use your semi-colon in place of the comma if needed.

  5. #5
    Registered User
    Join Date
    12-07-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Alternate Row Shading - conditional formula not working

    @Ursul
    Tried without the final "=0" at the end. Same effect. Putting a comma results in "invalid formula" prompt window, have to use semicolon. I have no idea why – I have a legit copy of Excel without any ingerention other than regular MS updates. I have retraced my steps yet again, yet could find no error on my side...

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697

    Re: Alternate Row Shading - conditional formula not working

    Quote Originally Posted by Ursul View Post
    Try again this time without the "=0" at the end; something like this =MOD(ROW(),2)
    Either version is valid, with =0 you get even rows formatted, without =0 you get odd rows formatted

    Whether you need comma or semi-colon is a regional settings issue. In the UK we use commas, in most of the rest of Europe it's semi-colons.

    See attached example
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-07-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Alternate Row Shading - conditional formula not working

    Works now... Turns out that instead of ROW I should have written the Polish equivalent - WIERSZ. This makes completely no sense whatsoever to me. That being said, thanks both of you for your contribution!
    Last edited by iyoossaev; 11-06-2013 at 06:36 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Shading/Dates on alternate lines?
    By cheeryble in forum Excel General
    Replies: 4
    Last Post: 10-04-2011, 03:54 PM
  2. Excel 2007 : table alternate row shading failing
    By by1612 in forum Excel General
    Replies: 1
    Last Post: 05-16-2011, 01:00 PM
  3. Alternate row shading on Pivot table results?
    By killiney08 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2008, 07:27 PM
  4. Alternate Shading
    By tamiluchi in forum Excel General
    Replies: 9
    Last Post: 04-28-2006, 04:00 PM
  5. Replies: 7
    Last Post: 04-26-2006, 01:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1