Home > Back-end >  Splitting text in Google Sheets converts numbers to dates, how could I prevent this?
Splitting text in Google Sheets converts numbers to dates, how could I prevent this?

Time:12-06

I have an address like this: 1111 Budapest Test Street 0339/1

I use regex with search and replace so it adds | characters, which I can use to split the address to different sections.

The problem is, when I split it, the 0339/1 turns into "-570142", others turn into numbers like "41675", but I have no idea why. Also, 1/1. in 1111|Budapest| Example |District|1/1.| becomes 44562 (which is the date 2022.01.01 if you change the format to it).

I've tried using every formatting on every single cell, but that didn't help.

I also tried come solutions I found here, like using the T formula and such, but those changed nothing.

Any idea would be appreciated, I'm kind of flatterned on this problem rn.

edit #1: Expected output: image

Like this?

=REGEXEXTRACT(A1,"(^[0-9] )\s(. )\s([0-9] . )")

Extracted as requested:

image

=REGEXEXTRACT(A1,"^(\d )\s(. )\s(. )\s(. )")

CodePudding user response:

try:

=SPLIT(SUBSTITUTE(A70&" ", " ", " ​"), " ")

enter image description here

see: https://stackoverflow.com/a/73967098/5632629

  • Related