Forum Discussion
Formula challenge: re-shape and cleanup
I've put thought into removing the 'bellman' records as early as possible. The way I designed this problem (Placing blank rows intermittently) it makes it very difficult to pull those records until before using TOCOL and WRAPROWS. I've considered using MAP to pull the records but the blank rows are an issue (and using MAP to cleanup before TOCOL/WRAPROWS is probably not very efficient). I had also considered BYROW to identify the rows to be used in the array but again, removing the blank rows first would have to be done. FILTER appears to be the best option at the moment. Maybe the calculations are a bit quicker if the 'bellman' records are pulled earlier. It would certainly have to be done if the record set was much larger and the 'bellman' records had to be removed to allow HSTACK to run.
My first draft of this exercise actually included arbitrary header information every thousand rows or so (The sheet would've appeared to have been pasted from a poorly designed Word document). I like creating a puzzle and working towards a solution when it seems impossible. I might revisit that first draft.
- PeterBartholomew1Jun 04, 2022Silver ContributorIf you wish to add to the pain, delete Ron Palmer's email address (row 2) and see what happens
- Patrick2788Jun 04, 2022Silver Contributor
At that point I think it's still do-able but maybe not worth the trouble. I'd still ignore blanks with TOCOL, then I think it comes down to writing logic. I'd use the @ to identify complete records.
Text - Keep
Text - Keep
@ - Keep
Text - Drop
Text - Drop
Text - Keep
Text - Keep
@ - Keep- PeterBartholomew1Jun 05, 2022Silver Contributor
The attached shows alternative points within the calculation at which one may choose to apply the Bellman filter. I also tests for blank rows (as it would for repeat headers) and removes them with FILTER rather than using the setting within TOCOL.
[Note: the formula is still vulnerable to error if all 3 email addresses are missing from any given row]