メインコンテンツへスキップ

Excelでコメント付きのセルをフィルタリングするにはどうすればよいですか?

ワークシートにコメントを挿入して、重要な情報や詳細をマークできるようにするのが一般的です。 ただし、特定の条件では、コメントを含む行のみをフィルタリングして、見やすいようにまとめたいと考えています。 このジョブを直接解決するために、Excelのフィルター機能を使用することはできません。 この記事では、Excelでコメント付きのセルをフィルタリングする方法を学習します。

ヘルパー列を作成して、コメント付きのセルをフィルタリングします


矢印青い右バブル ヘルパー列を作成して、コメント付きのセルをフィルタリングします

コメント行のみをフィルタリングするには、コメントセルを次のように識別できます。 ユーザー定義関数 最初に適用し、次に フィルタ 機能。

1。 を押し続けます Altキー+ F11 Excelでキーを押すと、 Microsoft Visual Basic forApplicationsウィンドウ.

2. インセット > モジュール、次のマクロをに貼り付けます モジュールウィンドウ.

VBAコード:コメントを含むセルを特定します

Function HasComment(r As Range)
'Update 20140718
    Application.Volatile True
    HasComment = Not r.Comment Is Nothing
End Function

3。 次に、コードを保存して閉じます モジュール ウィンドウをクリックし、ワークシートに戻って、この式を入力します = HasComment(B2) コメントセルの隣の空白のセルに(B2 使用する値が含まれています)スクリーンショットを参照してください:

ドキュメントフィルターコメント-1

4。 次に、この数式を適用する範囲セルに塗りつぶしハンドルをドラッグすると、次のようになります。 TRUE or 間違った情報 細胞内では、 TRUE コメントとコメントがあるセルを表します 間違った情報 コメントがないことを示します。

5。 コメントセルを特定したら、データ範囲を選択して、[ 且つ > フィルタ、スクリーンショットを参照してください:

ドキュメントフィルターコメント-1

6。 次に、ヘルパー列の横にあるドロップダウン矢印をクリックして、チェックします。 TRUE オプションのみ。スクリーンショットを参照してください。

ドキュメントフィルターコメント-1

7。 をクリックします OK ボタンをクリックすると、コメント行は次のスクリーンショットのように除外されます。

ドキュメントフィルターコメント-1

8。 最後に、必要に応じて列Cの内容を削除できます。

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!

 

Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I am using Excel 365 and tried using Notes instead of Comments and I get #NAME?. When I try comments, I get all False. I confirmed that my cells have Comments and not Notes in the cells. What am I doing wrong?
This comment was minimized by the moderator on the site
Hello, Annie
In Excel 365, you can see the note is shown as below screenshot:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-comment-note-1.png

And the comment is shown as this:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-comment-note-2.png

So, if there are notes in your worksheet, you just use the code in this article and don't change any thing, then apply the formula you will get the correct results as below:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-comment-note-3.png

Please try, hope it can help you!
This comment was minimized by the moderator on the site
And how to do it with COMMENTS? Not NOTES.

Johnny
This comment was minimized by the moderator on the site
Me sale todo falso a que se debe
This comment was minimized by the moderator on the site
Hello Marcela,

Glad to help. May I know whether the Excel version you are using is Microsoft Excel 365, which can be different from other versions of Excel?

If it is Microsoft Excel 365, then I know what leads to the problem. In Microsoft Excel 365, Notes replaced the Comments in other versions of Excel. So change your comments to notes, then the returned values will be TRUEs. Please have a try. Looking forward to your reply.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
Hi, so how to do it with COMMENTS? Without changing them to notes.

Thx,
johnny.
This comment was minimized by the moderator on the site
Maravilhoso!!!!!! Obrigado!!!!
This comment was minimized by the moderator on the site
Gracias por este aporte, muy recomendado esta página.
This comment was minimized by the moderator on the site
I would like to know how does the "HasComment = Not r.Comment Is Nothing" part works. Thanks!
This comment was minimized by the moderator on the site
Amazing solution to a problem. Loved it.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations