Formula options for filling in blank value using previous rows
Data is coming in like this with blank Name gaps:
I'm using this in Name helper
=IF(ISBLANK(Name@row), IF(ISBLANK(INDEX(Name:Name, MATCH([Row ID]@row - 1, [Row ID]:[Row ID], 1))), INDEX(Name:Name, MATCH([Row ID]@row - 2, [Row ID]:[Row ID], 1)), INDEX(Name:Name, MATCH([Row ID]@row - 1, [Row ID]:[Row ID], 1))), Name@row)
and have successfully filled in as you could see up to 2 blanks. E.g. Name 4. To accommodate more than 2 gaps the only way I came up with is to keep repeating the if sequence but that'll be a crazy long formula if I want to accommodate say 8 or 9 gaps.. Looking for a simpler way.....
@Paul Newcome @Genevieve P. ... show me your magic 😁
Best Answers
-
@markkrebs I've had to solve something similar. Try this:
=IF(ISBLANK(Name@row), INDEX(Name:Name, MATCH(MAX(COLLECT([Row ID]:[Row ID], [Row ID]:[Row ID], < [Row ID]@row, Name:Name, NOT(ISBLANK(@cell)))), [Row ID]:[Row ID], 0)), Name@row)
Logic: If the Name is blank, find the Name value from the row with the highest Row ID that is less than this row's Row ID, where the Name isn't blank; otherwise, set this cell to Name@row.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Awesome!!! thanks!
Answers
-
@markkrebs I've had to solve something similar. Try this:
=IF(ISBLANK(Name@row), INDEX(Name:Name, MATCH(MAX(COLLECT([Row ID]:[Row ID], [Row ID]:[Row ID], < [Row ID]@row, Name:Name, NOT(ISBLANK(@cell)))), [Row ID]:[Row ID], 0)), Name@row)
Logic: If the Name is blank, find the Name value from the row with the highest Row ID that is less than this row's Row ID, where the Name isn't blank; otherwise, set this cell to Name@row.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Awesome!!! thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!