<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>benkei_maru</author_name>
  <author_url>https://blog.hatena.ne.jp/benkei_maru/</author_url>
  <blog_title>晴れのうらかた</blog_title>
  <blog_url>https://hareno-urakata.com/</blog_url>
  <categories>
    <anon>Excel_VBA</anon>
  </categories>
  <description>下記は「12345ABC」などの文字列から「12345」部分だけを取り出したい場合の一例。 1列目に格納された「11111xxx」形式の文字列から、先頭5桁の値を取り出し、隣の2列目にその値を格納する。 Sub a() Dim str As String Dim i As Integer str = &quot;&quot; i = 1 For i = 1 To 10 str = Worksheets(1).Cells(i, 1) If Trim(str) &lt;&gt; &quot;&quot; Then Worksheets(1).Cells(i, 2) = Left(str, 5) End If Next End Sub</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhareno-urakata.com%2Fentry%2F2021%2F03%2F09%2F000000&quot; title=&quot;Excel VBA 文字列の中から先頭の数文字を指定して取り出したい(Left関数) - 晴れのうらかた&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-03-09 00:00:00</published>
  <title>Excel VBA 文字列の中から先頭の数文字を指定して取り出したい(Left関数)</title>
  <type>rich</type>
  <url>https://hareno-urakata.com/entry/2021/03/09/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
