LoginSignup
2
2

More than 5 years have passed since last update.

split関数で区切文字が連続する場合にデータの空白を列に反映させる方法

Last updated at Posted at 2016-08-27

問題

データがNULLのカラムなどで区切り文字が連続で表示される場合、
split関数をそのまま利用すると、データがずれてしまう

例)

csvデータ

1a,b,c,d,e
2a,,c,,e

splitを利用

1a|b|c|d|e
2a|c|e|◯|◯
※◯の分データが左寄せになる

回避策

substitute関数を利用する
例)
split(substitute(substitute(a1,",,",",NA,"),",,",",NA,"),",")

参考
Google スプレッドシート 区切り文字を指定して文字列を複数セルに分割

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2