+ Reply to Thread
Results 1 to 8 of 8

alternate Formatting on multiple rows

  1. #1
    Forum Contributor
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    211

    alternate Formatting on multiple rows

    hello

    I would like have dark & lighter grey Fill to alternate on rows, as Column E change..

    is there way of doing it other than manually ?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: alternate Formatting on multiple rows

    1) Format the entire data set to the lighter grey color

    2) Apply conditional formatting to the entire data set using this formula, set it to the darker color:

    =ISODD(SUM(IF(FREQUENCY($E$1:$E1,$E$1:$E1)>0,1)))
    Last edited by JBeaucaire; 06-21-2013 at 06:13 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: alternate Formatting on multiple rows

    hi bimo, another alternative:
    =MOD(SUMPRODUCT(($E$1:$E1<>"")/COUNTIF($E$1:$E1,$E$1:$E1)),2)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: alternate Formatting on multiple rows

    Quote Originally Posted by benishiryo View Post
    hi bimo, another alternative:
    =MOD(SUMPRODUCT(($E$1:$E1<>"")/COUNTIF($E$1:$E1,$E$1:$E1)),2)
    You might have to wrap that in ROUND()
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    [EDIT]
    Because all C/F formulae are treated as arrays, you could use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    But Jerrys' solution is the shortest way. ...
    Last edited by Marcol; 06-21-2013 at 08:20 AM.

  5. #5
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: alternate Formatting on multiple rows

    Hi,

    Another Alternatives

    =IF(MOD(ROW(),2)=0,TRUE,FALSE) 'Put this in one condition
    =IF(MOD(ROW(),2)=1,TRUE,FALSE) 'Put this in another condition

    regards
    taps

    Again:: Sorry, this is for each alternative rows.
    Last edited by taps; 06-21-2013 at 07:43 AM.

  6. #6
    Forum Contributor
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: alternate Formatting on multiple rows

    Hi Guy, none of the fourmlas worked for me ..I can`t identify where I went wrong..Do you mind uploading the worksheet with the forumla working ? sorry for the stupid question.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: alternate Formatting on multiple rows

    Like so....
    Attached Files Attached Files

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: alternate Formatting on multiple rows

    Here you go, two sheets one for Jerrys' way, the other Bens'

    [EDIT]
    Jerry beat me to it, didn't see he was on line ...
    I have cleared the fill colour from the range, just select A1:A45 and fill with the colour of your choice.

    Better this than using two C/F conditions.

    Conditional Formatting is volatile by definition.
    It can be very expensive on larger sheets.
    So the less conditions the better.
    Attached Files Attached Files
    Last edited by Marcol; 06-21-2013 at 10:19 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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