<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>t-hom</author_name>
  <author_url>https://blog.hatena.ne.jp/t-hom/</author_url>
  <blog_title>t-hom’s diary</blog_title>
  <blog_url>https://thom.hateblo.jp/</blog_url>
  <categories>
    <anon>VBA</anon>
  </categories>
  <description>先日、仕事で受け取ったExcelデータにTRIM関数で除去できない謎の半角スペースが混じっていた。その現象を再現したのがこちら。 A1セルとA2セルは全く同じに見えるが、A1セルの1文字目はトリムできない謎のスペース。A2セルの方は通常のスペースである。このようにTRIM関数を使っても、スペースが消えてくれない。 VBAで謎のスペースを調査 いったいこのスペースは何なのか。VBAで調べてみた。 まずはふつうにイミディエイトウインドウに出力してみる。 Sub とりあえず出力() Debug.Print Range(&quot;A1&quot;).Value Debug.Print Range(&quot;A2&quot;).Value…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthom.hateblo.jp%2Fentry%2F2016%2F09%2F20%2F150650&quot; title=&quot;Excel TRIM関数で消えない謎の半角スペースをVBAでなんとかする - t-hom’s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/t/t-hom/20160920/20160920135926.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-09-20 15:06:50</published>
  <title>Excel TRIM関数で消えない謎の半角スペースをVBAでなんとかする</title>
  <type>rich</type>
  <url>https://thom.hateblo.jp/entry/2016/09/20/150650</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
