+ Reply to Thread
Results 1 to 9 of 9

Grey bar

  1. #1
    Registered User
    Join Date
    08-10-2017
    Location
    USA, Not otherwise relevant
    MS-Off Ver
    2003 SP3
    Posts
    25

    Question Grey bar

    Hello all,
    this one might be a bit odd, but when in large excel files particularly when dealing with lots of columns, I find it easier to keep my place if I make the sheet basically greybar.

    Now, I do it manually by selecting every even numbered row, and selecting "Fill Color", basically highlighting. This is fine as long as I don't need to sort, as the fill is attached to the data not the cell.

    Is there a way to make the fill attached to the cell number not the data so if i sort the greybar stays where I want it. Is this possible?

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,516

    Re: Grey bar

    Hi there,

    The attached workbook uses the following formula to conditionally format the even-numbered rows from 1 to 100:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-10-2017
    Location
    USA, Not otherwise relevant
    MS-Off Ver
    2003 SP3
    Posts
    25

    Re: Grey bar

    WOW, thanks Greg.

    This maybe an eyeroll worthy question, but where do i put in that equation?
    Also, if I need to go beyond 100 how would I adjust that?
    In that equation, how was grey picked?

    This looks like the perfect solution, just don't understand how to reproduce it?

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,516

    Re: Grey bar

    Hi again,

    Many thanks for your feedback.

    Click on HOME >> Conditional Formatting >> Manage Rules

    Select the Rule (there's only one!) and click on Edit Rule

    You'll see where the formula is inserted, where the formatting colour is selected, and also the range to which the conditional formatting applies.

    Hope this helps.

    Regards,

    Greg M

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,463

    Re: Grey bar

    You can also select your range - Insert Table - Check or don't check " My table has headers" -In the Table Tools - Design, select your design
    The row banding will adapt when you extend your range

  6. #6
    Registered User
    Join Date
    08-10-2017
    Location
    USA, Not otherwise relevant
    MS-Off Ver
    2003 SP3
    Posts
    25

    Re: Grey bar

    OHH, ok.
    So i select the rows up front then do the conditional formatting, gotcha.

    Replicated and worked as intended.

    I have to say though, while it worked, i don't fully understand the actual info i put into the conditional formatting. Would you mind going over that as well?
    =MOD ok, modifying
    ROW as opposed to column (this is whats being modified)
    () what is that representing? Since no data is being modified, is that why there is empty parenthesis?
    , 2 i know i have used this before, but I honestly don't remember what this means
    = 0 Not sure what this means?

    Yeah, im full of questions.

    Thanks again

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,463

    Re: Grey bar

    perhaps have a look at the syntax of the MOD() and ROW() functions

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,516

    Re: Grey bar

    Hi again,

    First of all, many thanks for your very prompt feedback and also for the Reputation increase - much appreciated!

    You're welcome - glad I was able to help.

    As far as the formula is concerned:

    Please Login or Register  to view this content.
    ROW() returns the row number of the cell in which the formula is entered

    MOD(a, b) returns the remainder when a is divided by b

    = 0 is true whenever the row number is even (a remainder of zero occurs whenever an even row number is divided by two)

    Hope this helps.


    Best regards,

    Greg M

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,463

    Re: Grey bar

    And with table formatting no formula is needed

+ 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. [SOLVED] How to Grey out check box
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-02-2015, 05:52 PM
  2. [SOLVED] Red vs grey envelopes... What does it mean?
    By bmxfreedom in forum The Water Cooler
    Replies: 9
    Last Post: 11-14-2013, 02:51 AM
  3. [SOLVED] Grey (zero value) rep
    By TMS in forum Suggestions for Improvement
    Replies: 18
    Last Post: 12-17-2012, 08:51 AM
  4. Shades of grey
    By Andrew-R in forum The Water Cooler
    Replies: 58
    Last Post: 01-29-2012, 06:07 AM
  5. Grey cells?
    By Nate Westcott in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-06-2011, 11:39 AM
  6. Grey out button
    By Midri in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2011, 03:23 PM
  7. [SOLVED] Grey box
    By olofcitifig in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-06-2005, 02:06 PM

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