Formula That Checks Multiple Rows For Filled Cells
Hello,
I currently have a Smartsheet that contains two different CR Numbers; each CR number populates multiple rows (see screenshot below).
I am trying to set up a formula that will go into the Eff Date column. If a user were to populate the Eff Date cell for one of the rows (for example, row 1), the formula will check all of the rows with matching CR Numbers (for this example, it would check all rows with a CR Number of 123). If the matching CR Number rows don't have Eff Date populated, then nothing happens. However, once all Eff Date fields are populated for all matching CR Numbers, then all of the rows with that particular CR Number will be highlighted green.
I know there's a way to do this via conditional formatting, but I don't know how (or if there is a way) to lump a group of rows together based on CR Number. Any advice on how to go about accomplishing this?
Thank You,
Ben
Best Answer
-
You will need a helper column with a formula. The below would be for a checkbox column that automatically checks the box when that group of rows is ready to be highlighted.
=IF(COUNTIFS([Eff Date]:[Eff Date], @cell = "", CR:CR, @cell = CR@row) = 0, 1)
Basically it says that if the count of rows that have a blank [Eff Date] and a matching CR is zero, then check the box(es).
Setting up your conditional formatting based on this box being checked should do the trick for you.
Answers
-
You will need a helper column with a formula. The below would be for a checkbox column that automatically checks the box when that group of rows is ready to be highlighted.
=IF(COUNTIFS([Eff Date]:[Eff Date], @cell = "", CR:CR, @cell = CR@row) = 0, 1)
Basically it says that if the count of rows that have a blank [Eff Date] and a matching CR is zero, then check the box(es).
Setting up your conditional formatting based on this box being checked should do the trick for you.
-
@Paul Newcome Thank you for the suggestion. The formula worked perfectly! I do have an additional question. I set up the conditional formatting based on the box being checked:
It should make all rows where there is a check mark green. However, nothing happens:
Am I missing something?
-
@Paul Newcome disregard my conditional formatting question. I managed to figure it out. Thanks again!
-
Glad you got it figured. When looking a the conditional formatting from your screenshot, the text represents the cell, and the bar to the right is the bar that appears in Gantt view.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.2K Get Help
- 452 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 81 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!