<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>auroralights</author_name>
  <author_url>https://blog.hatena.ne.jp/auroralights/</author_url>
  <blog_title>オーロラさんの勉強帳</blog_title>
  <blog_url>https://auroralights.jp/</blog_url>
  <categories>
    <anon>Excel</anon>
  </categories>
  <description>本記事では、データの左側を0で埋めて固定長のデータを作成する方法を紹介します。 社員コード、部門コードなどのように決まった桁数のコードで、先頭を0で埋めたいときに活用できます。 REPT関数とLENB関数を使用して、データの左側を0で埋める方法 以下画像では、A列の元データを、B列でREPT関数、LENB関数を使用して5桁の固定長データに変換しています。桁が足りない場合は先頭を0で埋めています。 REPT関数・LENB関数で0埋めして桁数を合わせるB2セルの数式は以下の通りです。 =REPT(0,5-LENB(A2))&amp;A2 「A2」を対象データがのセル、 「5」の部分を任意の桁数に変更して活…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fauroralights.jp%2Fentry%2F2025%2F03%2F28%2F002857&quot; title=&quot;【Excel】左側を0で埋めて固定長データを作成する方法 (先頭に0を追加して桁を合わせる) - オーロラさんの勉強帳&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/a/auroralights/20250327/20250327235309.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-03-28 00:28:57</published>
  <title>【Excel】左側を0で埋めて固定長データを作成する方法 (先頭に0を追加して桁を合わせる)</title>
  <type>rich</type>
  <url>https://auroralights.jp/entry/2025/03/28/002857</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
