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

Excelワークシートでスクロールしながら行全体/行全体を強調表示するにはどうすればよいですか? 

複数の列を持つ大きなワークシートがある場合、その行のデータを区別するのは困難です。 この場合、アクティブセルの行全体を強調表示して、水平スクロールバーを下にスクロールしたときにその行のデータをすばやく簡単に表示できるようにすることができます。この記事では、この問題を解決するためのいくつかの秘訣について説明します。 。

VBAコードでスクロールするときに行全体を強調表示する

Kutools for Excelでスクロールするときに、行/列/行と列全体を強調表示します


次のVBAコードは、選択したセルの行を動的に強調表示するのに役立ちます。次のようにしてください。

1。 選択したセルの行全体を強調表示するワークシートをアクティブにしてから、シートタブを右クリックして、 コードを表示 右クリックメニューから、スクリーンショットを参照してください。

docハイライト行全体1

2。 オープンで アプリケーション向け Microsoft Visual Basic ウィンドウで、次のコードをこの空白のモジュールにコピーしてください。

VBAコード:スクロール時に行全体を強調表示する

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updateby Extendoffice
Cells.Interior.ColorIndex = 0
Target.EntireRow.Interior.ColorIndex = 8
End Sub

3。 次に、このコードを保存して閉じます。セルをクリックすると、この選択したセルの行全体が次のスクリーンショットのように強調表示されます。

docハイライト行全体2
1
docハイライト行全体3

注意:

1.このスクリプトでは、ハイライトの色を好きな色に変更できます。Target.EntireRow.Interior.ColorIndex = 8」、数を変更します 8 別のカラーインデックスに。

2.このコードを無効にする場合は、 アプリケーション向け Microsoft Visual Basic ウィンドウをクリックし、コードを削除します。

3.このコードは、次の結果として、選択したセル範囲の行を強調表示することもできます。

docハイライト行全体4

4.このコードは、現在のワークシートにのみ適用されます。

5.ワークシートに色付きのセルがある場合、このコードを適用するとセルの色が失われます。


新しいツールを試してみたい場合- Kutools for Excelそのと 読書レイアウト、アクティブセルの行全体または列全体、あるいは行と列の両方を簡単に強調表示できます。

Kutools for Excel : 300以上の便利なExcelアドインがあり、30日以内に制限なしで無料で試すことができます. 

インストールした後 Kutools for Excel、次の手順で実行してください。

1。 行を強調表示するセルまたはセルの範囲を選択します。

2に設定します。 OK をクリックします。 クツール > 読書レイアウト ドロップダウンボタン> レイアウト設定の読み取り、スクリーンショットを参照してください:

3。 の中に レイアウト設定の読み取り ダイアログボックスで、下の行または列を強調表示するために必要なタイプをXNUMXつ選択します。 形状 セクションをクリックし、この形状のスタイルを指定すると同時に、必要に応じて色や透明度などの他のオプションを選択できます。スクリーンショットを参照してください。

ヒント:選択したセルの行と列を強調表示する場合は、を選択してください Criss-cross形状 セクション、および選択 垂直線 アクティブセルの列全体を強調表示します。

4. ダイアログボックスの設定が完了したら、をクリックしてください Ok、そして今、セルをクリックすると、行全体が一度に強調表示されます。 また、選択したセルの変更に応じて動的に移動します。

注意:

1.このユーティリティのチェックを外すと、キャンセルできます。 読書レイアウト 再び。

2。 この 読書レイアウト 機能は、ブック内のすべてのワークシートに適用されます。

3。 この 読書レイアウト 次回ワークブックを起動すると、この機能は無効になります。

4.このユーティリティを使用すると、色付きのセルが保持されます。

この読書レイアウトの詳細については、クリックしてください。

今すぐExcel用のKutoolsをダウンロードして無料トライアル!


Kutools for Excel:300以上の便利なExcelアドインがあり、30日以内に制限なしで無料で試すことができます。 今すぐダウンロードして無料トライアル!

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

🤖 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
grazie
Molto utile ,
Ho un problema però, annulla l'eventuale colore delle celle che seleziono o se volessi impostare altro colore a una cella quando la seleziono mi scompare.
grazie
This comment was minimized by the moderator on the site
Hello, andrea

It may be difficult to modify the VBA code, so, here, I recommend you to apply the Conditional Formatting feature for solving this problem, please view the below article:
https://www.extendoffice.com/documents/excel/3500-excel-highlight-selected-row-conditional-formatting.html

Or you can use the Kutools for Excel' Reading Layout feature, you can try it 30 days for free.
Please download from: https://www.extendoffice.com/download/kutools-for-excel.html
This comment was minimized by the moderator on the site
This is so cool, but it removes any existing highlights from cells unless they are the result of conditional formatting. Any way to avoid that?
This comment was minimized by the moderator on the site
Hello, BHarris
It may be difficult to modify the VBA code, so, here, I recommend you to apply the Conditional Formatting feature for solving this problem, please view the below article:
https://www.extendoffice.com/documents/excel/3500-excel-highlight-selected-row-conditional-formatting.html

Or you can use the Kutools for Excel' Reading Layout feature, you can try it 30 days for free.
Please download from: https://www.extendoffice.com/download/kutools-for-excel.html
This comment was minimized by the moderator on the site
Does not work for MS Office - Excel 2016
This comment was minimized by the moderator on the site
is there a way to get it to only do a set of 4 cells along the specific row?
This comment was minimized by the moderator on the site
Hello, David,
The following VBA code can help you to highlight the cells that you selected, please try it. Hope it can help you!

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Target.Interior.ColorIndex = 8
End Sub
This comment was minimized by the moderator on the site
Hi thanks for providing the code....it is so useful for our report, but actually for my report the hyperlink is there in the other sheet in the same workbook and highlighted cell is there in the next sheet, that selected cell row total should be selected. but while running this code im getting a run-time error '1004'. will you please help me on this ...
This comment was minimized by the moderator on the site
Thank You for this !
This comment was minimized by the moderator on the site
Thank you for the code to highlight the whole row. It is *AWESOME* and is going to make scrolling spreadsheets so much easier.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations