Excel line highlighting by condition. How to select rows in Excel by condition? Selection of lines with specified values. Setting cell background color based on value

Hello everyone. Today's post I want to devote to ways to select cells in Microsoft Excel. If you already know how to select cells - skim the text, perhaps some of the program's features are not known to you, and you do not take advantage of them.

And so, the selection of groups of cells is needed in order to perform some common action with them: or, etc. How can you highlight cells in Excel? Understanding!

How to select all cells of an Excel sheet

I will immediately answer the most asked question on the topic of the article. How to select all cells of a sheet at once? I offer you two ways, which one you like best, and use that one:

Selecting a rectangular range of cells

Let's say you need to select a rectangular group of cells to format them for your data type. I can offer 5 ways to highlight, and you choose which one is appropriate for you at the moment:

  1. Mouse selection... The most common way is to hold down the left mouse button inside one of the cells (not on the frame) and stretch the selection in the desired direction along the rows and columns
  2. By holding down a key Shift. Place the cursor in one of the corner cells of the future selection. Hold Shift and use the arrow keys to select an area. When done, release Shift.
  3. Press the key F8. The command is similar to the previous one, but the key does not need to be held down. Place the cursor in one of the corner cells of the pattern, press F8 to turn on the selection mode. Use the arrow keys to expand the selection, or click in the opposite corner of the future selection. When the array is selected, press F8 again to exit this mode.

    Another way is to place the cursor in the upper left cell of the range, hold down Shift and click on the lower right cell (see fig.)

  4. Enter in the "Name" field cell address or range of cells (separated by colon) and press Enter

  5. Execute the command(on the keyboard - F5, or Ctrl + G). In the window that opens, in the "Link" field, enter the address of a cell or a range of cells separated by a colon. Click Ok

Selection via the "Go" command

Select Rows and Columns Entirely

If you need to select an entire column or row, here are several options:

  • Click the mouse on the row number or column name. If you need to select several adjacent lines - hold down the left mouse button on the line number and drag the selection to the lines you want to select. We do the same with columns
  • Place the cursor in any cell of the row you want to select and press combination Shift + Space. Use Ctrl + Space to select a column
  • To highlight non-adjacent rows and columns - clampCtrl and click by column names and line numbers. When finished, release Ctrl.

Highlighting non-contiguous ranges

If you need to select several cells that are not standing next to each other, do it in one of the following ways:

Selection on multiple sheets at the same time

If the worksheets of the same document contain the same tables with different data, we can perform operations on all tabs at the same time. This saves time and reduces the likelihood of error. For example, we need the headers of each of the tables on several sheets. You don't need to do this on each tab separately - select all the sheets and do everything in one go.

To select the same area on multiple sheets, first select the sheets you want. Activate the first sheet from the list, hold down Ctrl and click on the labels of all sheets to select.

When all the necessary sheets are selected, you can perform operations. Please note that the inscription “ [Group]". This means that Excel is ready to process a group of sheets.


Changing the name when selecting a group of sheets

Further, on the active sheet, select the required ranges, make changes, fill in the general data and formulas. Everything you do will be applied to all the selected sheets. Do not forget to deselect the sheets after finishing the batch processing. To do this, click on any shortcut of the grouped sheet with the right mouse button, in the context menu, select Ungroup.

Conditional selection of cells

Microsoft Excel can highlight a group of cells based on their content. Not all users are aware of this feature, although its use can be very useful.

Execute the command Home - Editing - Find & Select - Go... In the window that appears, click Select…. The Select Cell Group dialog box appears, with the following selection options available:


Selecting cells by their content

Selecting cells through the search box

To open the value search window - execute Home - Editing - Find & Select - Find(or press the key combination Ctrl + F). Find All appears. A list of cells containing the selected data will appear at the bottom of the window. Select one or several cells (holding Ctrl) in the list so that Excel will select them. To select all found cells - select one of them and press the Ctrl + A combination.

You can use special characters for searching:

  • "?" - any one character
  • "*" - any number of characters

For example, to find all cells that start with the letter "A" - enter "A *" in the search.

That's all about the selection of cells in MS Excel, and I want to devote the next post. As always, this article will contain many useful things that will definitely come in handy in your work. So, read it, you won't regret it!

By the way, I am waiting for your questions regarding this article in the comments!

To accomplish this task, we will use the conditional formatting capabilities.
Let's take a table containing a list of orders, their due dates, current status, and cost. Let's try to make its cells colorize themselves, depending on their content.

Excel 2010 manual


TURN ON SUBTITLES!

How to do it in Excel 2007


TURN ON SUBTITLES!
Select the cells with order prices and, by clicking on the arrow next to the "Conditional Formatting" button, select "Create Rule".

Let's select the fourth item, which allows you to compare the current values ​​with the average. We are interested in values ​​above the average. Pressing the "Format" button, set the color of the cells.


We confirm our choice, and the cells with the price above the average turn blue, drawing our attention to expensive orders.


Select cells with order statuses and create a new rule. This time, we will use the second option, which allows you to check the contents of the cell. Select "Text", "contains" and enter the word "Done". Let's set the color green, confirm, and the work done here turned green.


Well, let's make one more rule, coloring overdue orders in red. We highlight the dates of the orders. When creating a rule, select the second item again, but this time set the "Cell value", "less", and in the next field, enter a function that returns today's date.


OK, and we got a fun colored spreadsheet that allows us to visually track the progress of orders.


Have you noticed that statuses are set by choosing from a drop-down list of values? We described how to make such lists in the instructions.

How to do it in Excel 2003


TURN ON SUBTITLES!
"Conditional Formatting" in the "Format" menu. It will take a little more manual work here. This is how the settings for our first task will look like - paint over the cells with values ​​greater than the average.


You will have to manually enter the function "= AVERAGE ()", put the cursor between the brackets, click on the button next to it and specify the desired range with the mouse.
But the principle is the same.
Conquer Excel and see you soon!

Need to highlight duplicate values ​​in a column? Need to select the first 5 maximum cells? Do you need to make a thermal scale for clarity (the color changes depending on the increase / decrease in the value of the cells)? In Excel, color highlighting of cells by conditions can be done very quickly and easily. A special function "Conditional Formatting" is responsible for highlighting the cells with color. Highly recommend! Read on for more details:

I described the main features at the beginning of the article, but in fact there are a lot of them. More about the most useful

To begin with, on the task ribbon in the main menu, find the Styles section and click on the Conditional Formatting button.

When clicked, a menu will open, with different options for this editing. As you can see, there are really many opportunities here.

Now more about the most useful ones:

Excel color highlighting of cells by conditions. Simple conditions

To do this, go to the Cell Selection Rules item. If, for example, you need to select all cells larger than 100, click the More button. In the window:

By default, conditions are suggested to be highlighted in red, but you can set the desired formatting of cells by clicking in the right window and selecting the option you need.

Highlighting duplicate values, incl. on multiple columns

To select all duplicate values, select the appropriate Duplicate Values ​​menu.

What to do if you need to find repetitions in two or more columns, for example, when the full name is in different columns? Make another column and concatenate the values ​​with the formula =, i.e. in a separate cell you will have written IvanovIvanIvanych. By this column, you can easily highlight duplicate values. It is important to understand that if the word order differs, then Excel will consider such lines to be non-repeating (for example, IvanIvanychIvanov).

Highlighting the first / last values ​​in color. Again, conditional formatting

To do this, go to the Rules for selecting the first and last cells and select the required item. In addition to the fact that you can highlight the first / last values ​​(including by percentage), you can use the ability to highlight data above and below the average (I use it even more often). Very handy for viewing results that deviate from normal or average!

Building a thermal diagram and a histogram

Cool feature for data visualization is thermal / temperature chart. The bottom line is that depending on the value of the value in a column or row, the cell is highlighted with a certain shade of color, the more, the redder, for example. Tables are much better perceived by eye, and decision making becomes easier. After all, one of the best analyzers is often our eye, respectively, the brain, not a machine!

The histogram in the cell (in blue in the figure below) is also an extremely useful function for detecting changes in values ​​and comparing them.

Highlight cells containing specific text

Very often you need to find cells that contain a certain set of characters, you can of course use the = function, but it's easier and faster to apply conditional formatting, go through - Cell selection rules - Text contains

Very useful when working with text. An example, when in a column you have the full names of employees, and you need to select all of the Ivanovs' colleagues. Select the cells, go to the desired item and select the containing text Ivanov, then filter the table by color

Excel highlighting with color. Filter by color

In addition to the above possibilities, you can filter the selected cells by color with a regular filter. To my surprise, very few people know about this - apparently there are echoes of the 2003 version - there was no such possibility.

Checking formatting conditions

To check what conditional formatting you have set, go to Home - Conditional Formatting - Manage Rules. Here you can edit the conditions already set, the range of application, and also select the priority of the specified formatting (who is higher, the more important, you can change the buttons - arrows).

Invalid conditional formatting range

Important! Conditional formatting when misused is often the cause of the strong. There is a duplication of formatting, for example, if you copy cells many times with highlighting. Then you will have a lot of conditions with color. I myself saw more than 3 thousand conditions - the file slowed down ugly. Also, the file can slow down when the range is set as in the picture above, it is better to specify A: A - for the entire range.

Read more about Excel brakes and their causes. This article has helped hundreds of people;)

I hope it was useful, I don’t say goodbye!

Share our article on your social networks:

Each sheet of an Excel workbook is divided into rows and columns, the number of which depends on the version of the application. Rows and columns can be deleted, added, concatenated and moved. We've previously covered conditionally deleting rows, conditionally deleting columns, and adding blank rows to Excel workbooks. Below we will consider one more action performed with strings - selection.

How do I highlight one line?

There are several ways to select a line:

1. In the open sheet window, you can click the left mouse button with the arrow cursor once on the number of the required line;

2. also, in the open sheet window, you can set the selection marker to any cell of the required row and use the Shift + Space key combination;

3. Finally, you can set the selection marker to the first cell of the desired row and use the keyboard shortcut Ctrl + Shift + Right arrow. In this case, if there is data in the line, then the first press of this key combination will select part of the line with data, and the second - already the entire line.

How to select multiple lines in a row?

1. Select the first line of the required range and, without releasing the left mouse button, drag the arrow cursor over the numbers of the required lines;

2. select the first line of the required range and, while holding down the Shift key, click on the number of the last line of the required range;

3. click with the text input cursor in the address window of the formula line, enter a range of lines (for example 10:20) and press the Enter key.

How to select multiple lines not in a row?

To selectively select several lines, click on the numbers of the required lines with the arrow cursor while holding down the Ctrl key.

How to select rows conditionally?

If there is a need for selective selection of lines (for formatting, copying, or other purposes), for example, containing specified text or, conversely, not containing specific text, you can use an add-in that allows you to speed up the selection of lines for various conditions. Below is a dialog box that allows you to evaluate the capabilities of this add-in.

The add-on allows you to:

1. With one click of the mouse, open the macro dialog box directly from the Excel toolbar;

2. Find and highlight lines depending on the specified condition and specified values,

it is possible to enter several text values ​​at once, separated by ";" (semicolon);

3. Select one of eight conditions for strings with the desired value:

- matches the desired value;

- does not match the desired value;

- contains the Moscow value;

- does not contain the desired value;

- starts with the desired value;

- does not start with the desired value;

- ends with the desired value;

- does not end with the desired value.

4. When searching for text, consider or ignore the case (distinguish between uppercase and lowercase letters);

5. When a line is found, it is possible to select:

a) the entire line across the width of the sheet;

b) part of the string limited by the used range (from the first filled to the last filled cell);

c) part of the string, limited by the selected (selected) search range.

6. Select a range of strings to search for specified values ​​and, if necessary, impose restrictions on the selected range by setting the start and end string.

Hello dear readers. Have you ever worked with huge data in a table? You know, it will be much more convenient to work with them if you know how to highlight several Excel cells in different colors under a certain condition. Would you like to know how this is done? In this tutorial, we will make the cell color change depending on the Excel value, and also color all the cells using search.

Fill color changes with value

For example, we will practice making a cell change color in this table under a certain condition. Yes, none, but all with a value in the range from 60 to 90. For this we will use the "Conditional Formatting" function.

First, select the range of data that we will format.

Next, we find on the "Home" tab the "Conditional Formatting" button and select "Create Rule" from the list.

We have opened the "Create formatting rules" window. In this window, select the type of rule: "Format only cells that contain".

Next, go to the section "Change the description of the rule", where you need to specify the conditions according to which the filling will be performed. In this section, you can set a variety of conditions under which it will change.

In our case, it is necessary to put the following: "cell values" and "between". We also designate the range that, given a value from 60 to 90, a fill will be applied. Look at the screenshot how I did it.

Of course, when working with your spreadsheet, you may need to fill in completely different conditions, which you will indicate, well, but now we are just practicing.

If you have filled in, then do not rush to click on the "OK" button. First, you need to click on the "Format" button, as in the screenshot, and go to the fill settings.

Ok, as you can see, you have opened the "Format Cell" window. Here you need to go to the "Fill" tab, where you select the desired one, and click on "OK" in this window and in the previous one. I chose a green fill.

Look at your result. I think you have succeeded. I definitely did it. Take a look at the screenshot:

Let's color the cell in a certain color if it is equal to something

Let's go back to our table in its original form. And now we will change the color where the number 40 is contained to red, and with the number 50 to yellow. Of course, for this case, you can use the first method, but we want to know more Excel features.

This time we will use the Find and Replace function.

Select the part of the table to which we will make changes. If this is the whole sheet, then there is no point in highlighting.

Now is the time to open the search box. On the "Home" tab in the "Editing" section, click on the "Find and Select" button.

You can also use hotkeys: CTRL + F

In the "Find" field, we indicate what we are looking for. In this case, write "40" and then click the "Find All" button.

Now that the search results have been shown below, select one of them and press CTRL + A to select them all at once. And then click on "Close" to remove the "Find and Replace" window.

When we have selected all containing the number 40, on the "Home" tab in the "Font" section, select the color of the cell. We have it red. And, as you can see on your screen, and on my screenshot, they turned red.

Now the same steps need to be performed to color the ones where the number 50 is indicated. I think now you understand how to do this.

Did you succeed? And look what happened to me.

That's all. Thanks friends. Subscribe, comment, join the group, share on social networks and be always aware of new articles. Also, do not forget to study other articles on this site.