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

 行または列の最初/最後の空白でないセルを返す方法は?

ワークシートで作業する場合、行または列の最初または最後の空白以外のセル値を取得したい場合があります。 行または列に一目でデータが少ない場合は値を取得するのは簡単ですが、長い列または行にデータを返すのは面倒な作業になります。 ここでは、この仕事を解決するためのいくつかの便利な方法についてお話します。

行または列の最初の空白でないセルを数式で返します

行または列の最後の空白でないセルを数式で返します


矢印青い右バブル 行または列の最初の空白でないセルを数式で返します

データを含む最初のセルを抽出するには、次の数式を適用してください。

1。 データのほかに、空白のセルに次の数式を入力します。 =INDEX(A1:A13,MATCH(TRUE,INDEX((A1:A13<>0),0),0))、スクリーンショットを参照してください:

doc-return-first-data-cell-1

2。 次に、 入力します キーを押すと、次のように最初の非空白セル値が取得されます。

doc-return-first-data-cell-1

注意:

1.上記の式では、 A1:A13 は使用する列範囲です。必要に応じて変更できます。 この数式を適用して、行の最初の非空白セル値を取得することもできます。列範囲を行範囲に変更するだけです。

2.この数式は、単一の行または単一の列で正しく機能します。


矢印青い右バブル 行または列の最後の空白でないセルを数式で返します

空白以外の最後のセル値を返したい場合は、別の数式を使用すると便利です。

1。 この式を入力します =LOOKUP(2,1/(A1:A13<>""),A1:A13) データの横の空白のセルに、スクリーンショットを参照してください。

doc-return-first-data-cell-1

2。 次に、 入力します キーを押すと、最後の空白以外のセル値が一度に抽出されます。 スクリーンショットを参照してください:

doc-return-first-data-cell-1

注意:

1.上記の式では、 A1:A13 は使用する列範囲です。必要に応じて変更できます。 この数式を適用して、行の最後の非空白セル値を取得することもできます。列範囲を行範囲に変更するだけです。

2.上記の式は、単一の行または単一の列で正しく機能します。

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

🤖 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 (31)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How do i use this formula to return the columns header of the first cell with a value >0 ?
This comment was minimized by the moderator on the site
Hello, Tom,
To solve your problem, please apply the below formula:
=INDEX($B$1:$H$1,MATCH(TRUE,$B2:$H2>0,0))
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-return-column-headers.png

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Como faço para obter o menor valor de um intervalo, onde pode haver células em branco ?
This comment was minimized by the moderator on the site
Thank you so much for your content! I don't know what I'm doing wrong but I can't seem to be able to do this (in Google sheets) :

I need to fill H1 with the value from the first non-empty cell from C1 to G1. Then I need to copy this for all next rows (H2, H3, H4 etc)

Thanking you in advance for your time, it would be very appreciated :)
This comment was minimized by the moderator on the site
Hi, Marissa,
If you want to get the first non blank value from a row in Google sheets, please apply any one of the following formulas:

=QUERY(transpose(C1:G1),"Select Col1 where Col1 is not null limit 1",0)
=index(C1:G1,MATCH(FALSE,ISBLANK(C1:G1),0))

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Perfect answer. Have been looking for this for quite some time. Thank you!
This comment was minimized by the moderator on the site
Hi
I want to return the first non blank cell in a row but rather that with
information in top cell of the fist nin blank cell.
This comment was minimized by the moderator on the site
It works to find last non blank cell that has more than 255 characters, also. Helpful for me to solve issue.
Thanks a lot !
This comment was minimized by the moderator on the site
A1:A13<>0 returns an array of value that are either true or false
all values that are not 0 (eg <>0) in A1:A13 become true, and all else become false
So now you can look up the first 'true' in that array and use it to index
This comment was minimized by the moderator on the site
What does "INDEX((A1:A13<>0)" mean? The first parameter to INDEX is the set of cells A1 through A13 but with a test for not equal to zero appended. I can't find any explanation of this.
This comment was minimized by the moderator on the site
Hi can someone helpme on this,

I have a csv file or maybe a excel which has n number of data's in it from which i need few collective data's using formulas which should be automatic,and i need the output to be in a table form.can please anyone helpme on this??
This comment was minimized by the moderator on the site
I would really love to know why ,1/([RANGE]<>0) works :(
This comment was minimized by the moderator on the site
How To Return The Last Non Blank Cell from some selected cells In A Row
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations