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

Googleスプレッドシートでデータをアルファベット順に自動並べ替える方法は?

通常、Googleスプレッドシートでは、並べ替え機能を適用してデータをアルファベット順に手動で並べ替えることができますが、場合によっては、列内のデータを自動的に並べ替えることができます。 たとえば、列Aに変更や新しいデータが追加された場合、データは次のスクリーンショットのように自動的に並べ替えられます。 Googleスプレッドシートでこの仕事をどのように達成できますか?

数式を使用してGoogleスプレッドシートのデータをアルファベット順に自動並べ替え

doc自動ソート1


数式を使用してGoogleスプレッドシートのデータをアルファベット順に自動並べ替え

列内のデータをアルファベット順に自動的に並べ替えるには、次のようにします。

1。 次の式を入力します。 =sort(A2:B, 1, TRUE) 並べ替え結果を検索する空白のセルに移動し、を押します 入力します キー、特定のデータは昇順で並べ替えられています。スクリーンショットを参照してください。

doc自動ソート2

注意:

1.上記の式では: A2:B 並べ替えるデータ範囲、数値 1 データを並べ替える列番号を示します。 必要に応じて変更してください。

2.データを降順で並べ替える場合は、次の式を適用してください。 =sort(A2:B, 1, false) .

2.これ以降、新しいデータを入力したり、列のデータを変更したりすると、データは自動的に並べ替えられます。スクリーンショットを参照してください。

doc自動ソート1

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

🤖 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 (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How do you include more than 2 columns. I have 4 columns of data I need to sort....
This comment was minimized by the moderator on the site
Nice job! thanks for that. But someone knows how to make the function ignore blank spaces? I apply this formula to a set of data which has variable filled cells, so the sort considers empty spaces. How to ignore them?
This comment was minimized by the moderator on the site
Really helpful! It is possible to sort by multiple criteria: =sort(interval, column1, ascending?, column2, ascending?, ...).
This comment was minimized by the moderator on the site
Want to sort this automaticly but cant make it work

Numbers are M

The names are L

Djurgården 64
aik 63
Malmö 63
Hammarby 61
Häcken 92
Norköpping 59
Göteborg 56



function onEdit(event){
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var editedCell = sheet.getActiveCell();

var columnToSortBy = 2;
var tableRange = "L2:M8"; // What to sort.

if(editedCell.getColumn() == columnToSortBy){
var range = sheet.getRange(tableRange);
range.sort( { column : columnToSortBy, ascending: true } );
}
}
This comment was minimized by the moderator on the site
Can we update it self column when have any update or change on value (I mean update on column A and B not on the copy D and E)?
This comment was minimized by the moderator on the site
Can update it self colume when have any update or change on value (I mean update on column A and B not on the copy D and E)
This comment was minimized by the moderator on the site
Is it possible to sort by more than one column? thanks!
This comment was minimized by the moderator on the site
Thank you!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations