DW Faisalabad New Version

DW Faisalabad New Version
Please Jump to New Version
Showing posts with label Find and Replace. Show all posts
Showing posts with label Find and Replace. Show all posts

Friday, 17 February 2017

Search Box

This example teaches you how to create your own search box in Excel. If you are in a hurry, simply download the Excel file.

This is what the spreadsheet looks like. If you enter a search query into cell B2, Excel searches through column E and the results appear in column B.


To create this search box, execute the following steps.

1. Select cell D4 and insert the SEARCH function shown below. Create an absolute reference to cell B2.

2. Double click the right corner of cell D4 to quickly copy the function to the other cells.


Explanation: the SEARCH function finds the position of a substring in a string. The SEARCH function is case-insensitive. For Tunisia, string "uni" is found at position 2. For United States, string "uni" is found at position 1. The lower the number, the higher it should be ranked.

3. Both United States and United Kingdom return the value 1. To return unique values, which will help us when we use the RANK function in a moment, slightly adjust the formula in cell D4 as shown below.

4. Again, double click the right corner of cell D4 to quickly copy the formula to the other cells.


Explanation: the ROW function returns the row number of a cell. If we divide the row number by a large number and add it to the result of the SEARCH function, we always have unique values. However, these small increments won't influence the search rankings. United States has a value of 1.00006 now and United Kingdom has a value of 1.00009. We also added the IFERROR function. If a cell contains an error (when a string cannot be found), an empty string ("") is displayed.

5. Select cell C4 and insert the RANK function shown below.

6. Double click the right corner of cell C4 to quickly copy the formula to the other cells.


Explanation: the RANK function returns the rank of a number in a list of numbers. If the third argument is 1, Excel ranks the smallest number first, second smallest number second, etc. Because we added the ROW function, all values in column D are unique. As a result, the ranks in column C are unique too (no ties).

7. We are almost there. We'll use the VLOOKUP function to return the countries found (lowest rank first, second lowest rank second, etc.) Select cell B4 and insert the VLOOKUP function shown below.

8. Double click the right corner of cell B4 to quickly copy the formula to the other cells.


9. Change the text color of the numbers in column A to white and hide columns C and D.

Result. Your own search box in Excel.


Read More »

Copy Visible Cells Only

By default, Excel copies both visible and hidden cells. However, it is possible to copy visible cells only.

In this example, row 2 is hidden.


When you copy/paste this range, this is the result:


To copy visible cells only, execute the following easy steps.

1. Select the range A1:A4.

2. On the Home tab, click Find & Select, Go To Special...


3. Click Visible cells only and click OK.


Excel selects the visible cells.

4. Press Ctrl + c to copy the range.

5. Select cell A6 and press Ctrl + v to paste the range.

Result:


.
Read More »

Row Differences

This example teaches you how to quickly highlight cells whose contents are different from the comparison cell in each row.

1. To select the range A1:C15, click on cell A1 and drag it to cell C15.


Note: because we selected the range A1:C15 by clicking on cell A1 first, cell A1 is the active cell (Use ENTER and TAB to change the active cell). As a result, the comparison cells are in column A.

2. On the Home tab, click Find & Select, Go To Special...


3. Select Row differences and click OK.


For row 2, Excel selects cell B2 because 523 is not equal to the value in cell A2 (522). For row 4, Excel selects cell B4 and cell C4 because 725 is not equal to the value in cell A4 (723), etc.


4. On the Home tab, in the Font group, change the background color of the selected cells.

Read More »

Delete Blank Rows

This example teaches you how to delete blank rows or rows that contain blank cells.

1. On the Home tab, click Find & Select, Go To Special...


2. Select Blanks and click OK.


Excel selects the blank cells.


3. On the Home tab, click Delete, Delete Sheet Rows


Result:


Read More »

Find Features

o access some more advanced find features in Excel, execute the following steps.

1. Click on Options in the 'Find and Replace' dialog box.


2. Type the text you want to find. For example, type Ferrari.


3. Select Workbook from the Within drop-down list to find occurrences across all the worksheets.

4. Checking "Match case" will make your search case-specific. For example, it will only find Ferrari and not ferrari.

5. Checking "Match entire cell contents' will only find cells which contain exactly "Ferrari". For example, cells that contain "Car Ferrari", "Ferrarii" or even "Ferrari " will not be found.

Furthermore,

6. A question mark (?) matches exactly one character. For example, F?rrari will find Ferrari, Forrari, Farrari, etc. An asterisk (*) matches a series of zero or more characters. For example, F*rrari will find Ferrari, Foorrari, Faaaaaarrari, etc.
Read More »

Find & Select

You can use Excel's Find and Replace feature to quickly find specific text and replace it with other text. You can use Excel's Go To Special feature to quickly select all cells with formulas, comments, conditional formatting, constants, data validation, etc.

Find

To quickly find specific text, execute the following steps.

1. On the Home tab, click Find & Select, Find...


The 'Find and Replace' dialog box appears.

2. Type the text you want to find. For example, type Ferrari.

3. Click 'Find Next'.


Excel selects the first occurrence.


4. Click 'Find Next' to select the second occurrence.


5. To get a list of all the occurrences, click 'Find All'.


Replace

To quickly find specific text and replace it with other text, execute the following steps.

1. On the Home tab, click Find & Select, Replace...


The 'Find and Replace' dialog box appears (with the Replace tab selected).

2. Type the text you want to find (Veneno) and replace it with (Diablo).

3. Click 'Find Next'.


Excel selects the first occurrence. No replacement has been made yet.


4. Click 'Replace' to make a single replacement.


Note: use 'Replace All' to replace all occurrences.

Go To Special

You can use Excel's Go To Special feature to quickly select all cells with formulas, comments, conditional formatting, constants, data validation, etc. For example, to select all cells with formulas, execute the following steps.

1. Select a single cell.

2. On the Home tab, click Find & Select, Go To Special...


Note: Formulas, Comments, Conditional formatting, Constants and Data Validation are shortcuts. They can also be found under Go To Special.

3. Select Formulas and click OK.


Note: you can search for cells with formulas that return Numbers, Text, Logicals (TRUE and FALSE) and Errors. These check boxes are also available if you select Constants.

Excel selects all cells with formulas.


General note: if you select a single cell before you click Find, Replace or Go To Special, Excel searches the entire worksheet. To search a range of cells, first select a range of cells.
Read More »