If I understand correctly try these steps.
1.) Avoid the merged cells in columns R:X like the plague. They cause nothing but grief in formulas. I removed merging in the attached.
2.) In a helper column (see column S in the attached) use this helper formula to determine the number of accounts in each column Q string.
3.) In column R this formula parses the account #s within each cell. They are not all apparent upon first examination but they are there in memory. If you click in the formula bar and hit the F9 function key you will see them in an array .... {"10";"11"} .... of text "numbers".
If they need to have numeric values coerce those arrays by adding a 0 to the formula like this Then the array will be numeric ... {10;11}
Does this do what you want?
Bookmarks