Excelで画像を挿入し、自動的にサイズを変更してセル内に収める方法

PDF形式でダウンロードPDF形式でダウンロード

Excelのワークシートに画像やロゴを挿入して、より視覚的に魅力的なものにしたいことはありませんか?セル内の画像のサイズを変更する自動設定はありませんが、数回クリックするだけで自分で行うことができます。この記事では、Excelで画像を挿入し、サイズを変更してセル内に収める方法を紹介します。

  1. How.com.vn 日本語: Step 1 Microsoft Excelでプロジェクトを開く 
    これを行うには、Excel内でファイル>開くの順に選択するか、プロジェクトファイルを右クリックし、プログラムから開く>Excelの順に選択します。
  2. How.com.vn 日本語: Step 2 画像を挿入する 
    これを行うには、挿入>画像>画像の選択>挿入の順に選択します。
  3. How.com.vn 日本語: Step 3 サイズを変更する 
    画像を選択すると、「書式」と「画像ツール」の下に「サイズ」グループが表示されます。
    • 高さを変更して画像のサイズを調整しましょう。また、画像の隅のハンドルをドラッグ&ドロップしてサイズを再調整することもできます。
  4. How.com.vn 日本語: Step 4 セルに画像をロックする 
    デフォルトでは、挿入した画像はセルの上に「浮かんでいる」状態で、セルに合わせてサイズが変更されることはありません。これを解決するには、画像またはセルをロックする必要があります。
    • 画像を右クリックし、画像の書式設定をクリックしましょう。次に、「サイズとプロパティ」タブ(緑色の四角に矢印が付いたマーク)をクリックし、セルに合わせて移動やサイズ変更をするを選択します。
      • また、いくつかの画像を挿入した後にVBAコードを使用することもできます。画像を挿入し、Alt+F11キーを押してVBAウィンドウを開きましょう。挿入>モジュールの順にクリックし、以下のコードを貼り付けます。
      • Public Sub FitPic()On Error GoTo NOT_SHAPEDim PicWtoHRatio As SingleDim CellWtoHRatio As SingleWith SelectionPicWtoHRatio = .Width / .HeightEnd WithWith Selection.TopLeftCellCellWtoHRatio = .Width / .RowHeightEnd WithSelect Case PicWtoHRatio / CellWtoHRatioCase Is > 1With Selection.Width = .TopLeftCell.Width.Height = .Width / PicWtoHRatioEnd WithCase ElseWith Selection.Height = .TopLeftCell.RowHeight.Width = .Height * PicWtoHRatioEnd WithEnd SelectWith Selection.Top = .TopLeftCell.Top.Left = .TopLeftCell.LeftEnd WithExit SubNOT_SHAPE:MsgBox "Select a picture before running this macro."End Sub
    • F5キーを押してコードを実行し、ワークシート内のすべての画像がセルに収まるまでこの手順を繰り返しましょう。
    広告

このHow.com.vn記事について

How.com.vn 日本語: How.com.vn編集チーム
共著者 ::
How.com.vnスタッフライター
この記事は、経験豊富なHow.com.vnの編集者と調査員から成るチームによって執筆されています。調査員チームは内容の正確性と網羅性を確認しています。

How.com.vnのコンテンツ管理チームは、編集チームが編集した記事を細心の注意を払って精査し、すべての記事がHow.com.vnの高品質基準を満たしているかどうかを確認しています。 この記事は43,833回アクセスされました。
カテゴリ: オフィス
このページは 43,833 回アクセスされました。

この記事は役に立ちましたか?

⚠️ Disclaimer:

Content from Wiki How 日本語 language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

Notices:
  • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
  • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
  • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
  • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

広告