I am using the following code in many cells of the sheet,

=SPLIT(REGEXREPLACE("" & S2, "(\d)", "$1,"), ",")

not all are going to contain data at any one time. How do I stop the empty cell value notice from appearing?

  • try wrapping it into empty IFERROR function

    =IFERROR(SPLIT(REGEXREPLACE(""&S2, "(\d)", "$1,"), ","))

  • another way would be to use IF logic:

    =IF(LEN(S2), SPLIT(REGEXREPLACE(""&S2, "(\d)", "$1,"), ","), )

| improve this answer | |
  • Thanks for that worked a treat 🙂. Is there a way I can copy and drag down so my cell range changes as thus: s4 t4 u4 v4 etc – Peteh Jun 21 '19 at 22:08
  • =IFERROR(SPLIT(REGEXREPLACE(""&INDIRECT(ADDRESS(4, ROW($S19), 4)), "(\d)", "$1,"), ",")) – user0 Jun 21 '19 at 22:16
  • @Peteh if a provided answer solved your issue pls accept the answer – user0 Jun 24 '19 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.