+ Reply to Thread
Results 1 to 7 of 7

Excel 2003 - Formatting Question

  1. #1
    Registered User
    Join Date
    12-09-2003
    Posts
    53

    Excel 2003 - Formatting Question

    Hello,

    Wondered if someone could tell me how I can alternate the background color (fill color) of rows in a spreadsheet. Say I wanted every other row to be gray starting at row 10. Thanks much.
    Last edited by mab; 08-19-2009 at 11:04 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel 2003 - Formatting Question

    Select the rows starting at Row 10 and go to Format|Conditional Formatting.

    Select Formula Is and enter formula: =MOD(ROW(),2)=0

    Click Format and choose grey from the Pattern Tab.

    Click Ok

    Click Ok to finish
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Excel 2003 - Formatting Question

    depends if you just want to colour them grey ,then colour row 10 grey select row 10 and 11 and use the fill handle in the bottom left of the first cell in row 11 and drag down(only works of course if cells are blank or youll copy all the data as well)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    12-09-2003
    Posts
    53

    Re: Excel 2003 - Formatting Question

    Thanks very much for the information. Could I ask a silly question - can you explain what the formula MOD(ROW(),2)=0 means and how it works?

    Thanks again!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel 2003 - Formatting Question

    MOD() returns the remainder after number is divided by divisor

    In this case the number is the current row number (Row()) and the divisor is 2...

    so the answer will always be 1 or 0 depending on if you have an even or odd row number...

    e.g =Mod(1,2)=1
    =Mod(2,2)=0

    So the conditional formula checks to see if the result of the Mod() formula is 1 or 0 and applies the formatting if the result is 0 (or even row number).

  6. #6
    Registered User
    Join Date
    12-09-2003
    Posts
    53

    Re: Excel 2003 - Formatting Question

    Thanks a bunch for the explanation. Have a great day!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel 2003 - Formatting Question

    You are quite welcome,

    Please remember to mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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