search
HomeTopicsexcelHow to highlight cross rows in Excel

How to highlight cross rows in Excel

Mar 07, 2020 pm 01:49 PM
excelHighlight

In an Excel table, when there is a lot of data, it is easy to misread the row and column data. Today I will teach you a cross highlighting technique. When the data point reaches a certain point, the row and column will be automatically highlighted. Don’t worry about reading the wrong data!

How to highlight cross rows in Excel

How to highlight cross rows and columns in Excel

1. I usually use WPS for making tables

WPS has an advantage in this function. The setting is relatively simple. You only need to activate the reading mode under the view menu bar, and then select a cross color arbitrarily.

Recommended learning: excel basic tutorial

How to highlight cross rows in Excel

2. OFFICE Excel

The setting in the Excel table is relatively complicated. There are two situations and two methods:

● Suitable for when conditional formatting is not set in the worksheet

We are Under Visual basic of the development tool, or directly press ALT F11

How to highlight cross rows in Excel

to enter a string of codes in thisbook:

How to highlight cross rows in Excel

The code is as follows, you can copy and paste it directly. If you need a different color, you only need to change 20 to other numbers

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) 
    Cells.FormatConditions.Delete 
        With Target.EntireColumn 
            .FormatConditions.Add xlExpression, , "=true" 
            .FormatConditions(1).Interior.ColorIndex = 20 
        End With 
        With Target.EntireRow 
            .FormatConditions.Add xlExpression, , "=true" 
            .FormatConditions(2).Interior.ColorIndex = 20 
        End 
WithEnd Sub

The effect is as follows:

How to highlight cross rows in Excel

This code is applicable if there is no conditional formatting setting. If it is set, then use the following method

● It is applicable to the worksheet without any cell mark color

Similarly Press ALT F11 in the table, then enter the code:

How to highlight cross rows in Excel

where the code is:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Sh.Cells.Interior.ColorIndex = xlNone
     Target.EntireColumn.Interior.ColorIndex = 36 
     Target.EntireRow.Interior.ColorIndex = 36
 End Sub

This time we use 36, when we click on the cell , the display effect is yellow, as shown below:

How to highlight cross rows in Excel

Of course, when there is useful code in the Excel table, you need to save the table as xlsm format

How to highlight cross rows in Excel

Next time you need to cross-display data, use the above techniques to set it up. Have you learned it? Give it a try~

For more Excel-related tutorials, please pay attention to PHP Chinese website!

The above is the detailed content of How to highlight cross rows in Excel. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment