+ Reply to Thread
Results 1 to 4 of 4

Alternating White and Grey based on cell content

  1. #1
    Registered User
    Join Date
    02-05-2021
    Location
    Minnesota
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Alternating White and Grey based on cell content

    Hello! I'm trying to figure out how to find a way to automatically alternate rows between white and grey, depending on the text that is written in the first column of the sheet. Basically, when there text in the first column that is consecutively the same, I want the row color to match for those rows (grey). Then in the next row where the text changes to something else, I want that to be another color (white). When the text changes to something else in the next row, it would change back to the original color (grey). Etc, etc, etc. I have attached an image of what I want it to look like. Right now I filled in the cells manually, but I want to be able to do this automatically, so that it automatically updates when I add rows in random places. Thank you!

    Capture.JPG

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Alternating White and Grey based on cell content

    Yes. Use this as the Conditional formatting formula:

    =ISODD(SUMPRODUCT(1/COUNTIF($A$2:$A2,$A$2:$A2)))

    Apply it to the range required. I applied it down to row 50 in the sheet attached.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-05-2021
    Location
    Minnesota
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: Alternating White and Grey based on cell content

    Thank you! It worked perfectly.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Alternating White and Grey based on cell content

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

+ 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. Replies: 5
    Last Post: 09-26-2019, 10:40 AM
  2. sort all white fill cell on column I based on cell value specific txt if (true)
    By raijinlee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2017, 01:57 AM
  3. Highlight alternating rows in groups based on cell text
    By DWNGKF in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-22-2017, 12:36 PM
  4. [SOLVED] chage cell color to "white" if it isnt "grey"
    By baker74 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2015, 12:22 AM
  5. Macro to Grey out & disable user input in a row based on first cell value
    By necrome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 12:47 PM
  6. Replies: 3
    Last Post: 07-07-2012, 02:34 AM
  7. Replies: 3
    Last Post: 11-17-2010, 04:28 AM

Tags for this Thread

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