• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

How to highlight every other group of rows in a filtered range?|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / How to highlight every other group of rows in a filtered range?|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…How to highlight every other group …
sp_PrintTopic sp_TopicIcon
How to highlight every other group of rows in a filtered range?
Avatar
KENNETH BATILO
Member
Members
Level 0
Forum Posts: 27
Member Since:
January 30, 2020
sp_UserOfflineSmall Offline
1
November 8, 2022 - 1:34 am
sp_Permalink sp_Print sp_EditHistory

Hello all!

Long story short, I am able to conditional format a range to highlight every other group in an unfiltered range.  But I am having a hard time doing it for a filtered range.

For example.  For the filtered range below, I want item 1 and item 4 highlighted.

Sample.jpgImage Enlarger

Thanks in advance!

sp_PlupAttachments Attachments
  • sp_PlupImage Sample.jpg (15 KB)
Avatar
Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members


Trusted Members

Moderators

Power BI
Level 0
Forum Posts: 440
Member Since:
January 31, 2022
sp_UserOfflineSmall Offline
2
November 8, 2022 - 7:59 pm
sp_Permalink sp_Print sp_EditHistory

If I understand you correctly you want to be able to always highlight alternating groups in a table. Filtered or unfiltered.

Thus, when you filter out Item 4, then Items 1 and 7 should be formatted.

Perhaps there's another way but I came up with one that requires two helper columns that may be hidden.

One that determines if the row is visible or not and another that sets TRUE or FALSE that will be the basis for the conditional formatting rule. See if you can get this implemented in your own schedule, provided my assumptions were correct of course!

Screenshot-2022-11-08-105623.pngImage Enlarger

See attached.

Edit: In order to use consistent structured table references, the formula in the cf column should actually be

=ISODD(MATCH([@Ref],UNIQUE(FILTER([Ref],[visible]=1),0)))

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2022-11-08-105623.png (38 KB)
Avatar
KENNETH BATILO
Member
Members
Level 0
Forum Posts: 27
Member Since:
January 30, 2020
sp_UserOfflineSmall Offline
3
November 10, 2022 - 12:57 am
sp_Permalink sp_Print

This is great!  Works great with a table range.  Any idea on how to do this for a spilled range?  Aggregate doesn't seem to like spilled ranges 🙁

I'm using a spilled range because the rows of data isn't always the same.  I "could" put a macro to add or delete rows, but rather make it dynamic and based on the data.

Thanks again!  If all else fails, I'm gonna use this.

Avatar
Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members


Trusted Members

Moderators

Power BI
Level 0
Forum Posts: 440
Member Since:
January 31, 2022
sp_UserOfflineSmall Offline
4
November 10, 2022 - 3:02 pm
sp_Permalink sp_Print

Ah, I see. If your Excel version supports LAMBDA (and helper functions), you can put AGGREGATE in a BYROW/LAMBDA function to make it spill as demonstrated in the picture.

Screenshot-2022-11-10-at-05.57.37.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2022-11-10-at-05.57.37.png (35 KB)
sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Shanna Getschel, Velouria, Lynnette Altomari, Roy Lutke, Jack Brett, Jeff Krueger, Darrell Hodge, Natasha Smith, Sopi Yuniarti
Guest(s) 12
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Sopi Yuniarti
sandra parker
LAFONSO HERNANDEZ
Hayden Hao
Angela chen
Sean Moore
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Forum Stats:
Groups: 3
Forums: 24
Topics: 6214
Posts: 27243

 

Member Stats:
Guest Posters: 49
Members: 31893
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.